Answer the question
In order to leave comments, you need to log in
powershell request from python?
Tell me how can I execute this query in one line or in two lines
If I use
str = os.system("powershell Get-ADUser -filter {name -like 'Фамилия Имя'} ")
then it gives me information, but I need to write it to a file $GFile = "C:\Users\result.txt"
Get-ADUser -filter {name -like 'Фамилия Имя'} | Out-File $GFile -encoding Unicode
str = os.system("powershell $GFile = 'C:/Users/result.txt' Get-ADUser -filter {name -like 'Фамилия Имя'} | Out-File $GFile -encoding Unicode}")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question