Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Deleting a services with Get-CIM*

$
0
0

Hello everyone

I’m reworking some of my cmdlets to use Get-Cim instead of Get-WMIobject. My issue is

The Get-WmiObject way works.

$TDOCservices = Get-WmiObject -Class win32_service -filter “Name LIKE ‘%TDOC%’”
$TDOCservices.delete()

The Get-CimInstance way is not working…

$TDOCservices = Get-CimInstance -ClassName win32_service -Filter “Name LIKE ‘%TDOC%’”
$TDOCservices.delete()

Can any tell me what I’m overlooking or misunderstood?


Viewing all articles
Browse latest Browse all 13067

Trending Articles