Quantcast
Channel: SCSM PowerShell Cmdlets
Viewing all articles
Browse latest Browse all 306

New Post: Get-SCSMObject not returning computers

$
0
0
I'm stumped. Hopefully someone can tell me what I'm doing wrong. I'm just trying to get a list of computers from SCSM. I'm querying classes and names that I know exist (I can see them from the SCSM console), and I'm getting no results back at all.

This is what I'm running:

$Class = Get-SCSMClass -Name Microsoft.Windows.Server.computer$
Get-SCSMObject -Class $Class -filter "PrincipalName -like servername"

This returns nothing at all, but again, I know the server name actually exists in SCSM.

I can also just do a Get-SCSMObject -Class $Class and get no results, either. I would think that this should return all items of the server class.

Thanks in advance for your help. This is driving me insane!

Viewing all articles
Browse latest Browse all 306

Trending Articles