Advanced Search
Search Results
5 total results found
Check For Running Process
Check for a running process. If the process is not running, start it. #CHECK RUNNING PROCESS $Check = (Get-Service -Name <ServiceName> -ErrorAction SilentlyContinue -ErrorVariable ProcessError) Invoke-Command -ScriptBlock{ if($Check -eq $null) { W...
Create a Scheduled Task
To create a scheduled task in Windows Powershell that executes a Powershell Script. CREATE SCHEDULED TASK $action = New-ScheduledTaskAction -Execute "cd C:\path\to\script\location; ./script.ps1" $trigger = New-ScheduledTaskTrigger -At "8:15 pm" -Daily $pri...
Lock Windows Workstation
In command prompt, run: Rundll32.exe user32.dll,LockWorkStation
Get Powershell version
Powershell: Find powershell version $PSVersionTable.PSVersion
Get GUID of installed program and remove it
Powershell: Find GUID of program to uninstall. get-wmiobject Win32_Product | Sort-Object -Property Name | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize Uninstall a program using MsiExec - quietly msiexec.exe /x "{588A9A11-1E20-4B91-8817-2D...