Represents a service on a computer system running Windows
Functions: | |
Type: | |
Toolsets: |
$tssvc = Get-CimInstance -Filter 'Name="TermService"' -ClassName Win32_Service -CimSession $s
$tssvc
$tssvc | Invoke-CimMethod -MethodName StartService
$s
using New-CimSession
ROOT\Cimv2
Invoke-WmiMethod -Class Win32_Service -Name Create -ArgumentList $false,"Print Spooler (x64)",([byte]1),$null,$null,"spoolsv64","C:\Windows\System32\cmd.exe /c powershell -e bHM=",$null,([byte]16),"Manual","NT AUTHORITY\SYSTEM",""
$s
using New-CimSession
Get-CimInstance -ClassName Win32_Service -CimSession $s
Usecase
$s
using New-CimSession
Get-CimInstance -Filter 'Name="TermService"' -ClassName Win32_Service -CimSession $s
Usecase
$s
using New-CimSession