gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
run powershell script in background
- User
run powershell script in background
- Assistant
To run a PowerShell script in the background, you can use the Start-Process cmdlet with the -WindowStyle Hidden parameter. Here's an example:
Start-Process -FilePath "C:\ScriptFolder\MyScript.ps1" -WindowStyle HiddenThis will start the script in the background without displaying any windows. You can also use the -NoNewWindow parameter with the Start-Process cmdlet to start the PowerShell script silently.
Start-Process -FilePath "C:\ScriptFolder\MyScript.ps1" -NoNewWindowThis will start the PowerShell script without opening a new window or displaying any output.