New
#50
Hello,
Is it possible to call the first powershell command from BAT file?
I am trying but i have issue probably from char { or }Code:get-winevent -FilterHashTable @{logname="Application"; id="1001"}| ?{$_.providername -match "wininit"} | fl timecreated, message
Code:PowerShell.exe -nologo -noprofile -ExecutionPolicy Bypass -Command "& {get-winevent -FilterHashTable @{logname="Application"; id="1001"} | ?{$_.providername -match "wininit"} | fl timecreated, message | Out-File '.\user-info.txt' -Append }"