Advanced Search
Search Results
3 total results found
Check For Running Process
Workstations
Microsoft Windows
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
Workstations
Microsoft Windows
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
Workstations
Microsoft Windows
In command prompt, run: Rundll32.exe user32.dll,LockWorkStation