Month: February 2023

PowerShell: Maintain Windows Services Remotely via WinRM

# maintainServices.ps1 # FQDN of each computer name (required) $computerList=@' testWindows.intranet.kimconnect.com testWindows.dmz.dragoncoin.com '@ $serviceNames=@( 'windows_exporter',…

PowerShell: Kill a Windows Service Forcefully

# killService.ps1 $serviceName='vmms' function killService($serviceName='Spooler',$restart=$false){ $processId=Get-WmiObject -Class Win32_Service -Filter "Name LIKE '$serviceName'"|Select-Object -ExpandProperty ProcessId if($processId.count…