Dislocker/temp/powershell.py

10 lines
290 B
Python
Raw Normal View History

import os
# PowerShellコマンドを実行する関数
def run_powershell_command(command):
# PowerShellコマンドを実行
os.system(f"powershell -Command {command}")
# 例としてGet-Dateコマンドを実行して現在の日時を取得
run_powershell_command("Get-Date")