SCCM – PowerShell WMI for the SMS_R_System Class

email me

Return All Computer Names

get-wmiobject -NameSpace “root\sms\site_CODE” -ComputerName “SCCMServerName” -Class SMS_R_System| Select Name

Output:

Computer1

Computer2
Computer3
Computer4
Computer5

 

Return Column Names

Get-WmiObject -NameSpace “root\sms\site_CODE” -ComputerName “SCCMServerName” -Query “SELECT * FROM SMS_R_System WHERE Name = `”SCCMServerName`””

Output:

__GENUS : 2
__CLASS : SMS_R_System
__SUPERCLASS : SMS_Resource
__DYNASTY : SMS_BaseClass
__RELPATH : SMS_R_System.ResourceId=1087777777
__PROPERTY_COUNT : 74
__DERIVATION : {SMS_Resource, SMS_BaseClass}
__SERVER : SCCMServerName
__NAMESPACE : root\sms\site_001
__PATH : \\SCCMServerName\root\sms\site_001:SMS_R_System.ResourceId=1087777777
Active :
ADSiteName : TheSiteName
AgentName : {SMS_WINNT_SERVER_DISCOVERY_AGENT, SMS_NETWORK_DISCOVERY}
AgentSite : {001, 001}
AgentTime : {20170810020232.000000+***, 20170810115753.000000+***}
AlwaysInternet :
AMTFullVersion :
AMTStatus :
Build :
Client :
ClientEdition :
ClientType :
ClientVersion :
CPUType :
CreationDate : 20170527011353.000000+***
Decommissioned : 0
DeviceOwner :
DistinguishedName :
EASDeviceID :
FullDomainName :
HardwareID :
InternetEnabled :
IPAddresses : {10.10.10.10}
IPSubnets : {10.10.10.0}
IPv6Addresses : {}
IPv6Prefixes : {}
IsAOACCapable :
IsAssignedToUser :
IsClientAMT30Compatible :
IsMachineChangesPersisted :
IsPortableOperatingSystem :
IsVirtualMachine : False
IsWriteFilterCapable :
LastLogonTimestamp :
LastLogonUserDomain :
LastLogonUserName :
MACAddresses : {}
ManagementAuthority :
MDMComplianceStatus :
MDMDeviceCategoryID :
Name : SCCMServerName
NetbiosName : SCCMServerName
ObjectGUID :
Obsolete :
OperatingSystemNameandVersion : Microsoft Windows NT Server 10.0
OSBranch :
PreviousSMSUUID :
PrimaryGroupID :
PublisherDeviceID :
ResourceDomainORWorkgroup : DOMAIN
ResourceId : 1087777777
ResourceNames : {SCCMServerName.DOMAIN.com}
ResourceType : 5
SecurityGroupName : {}
SerialNumber :
SID :
SMBIOSGUID :
SMSAssignedSites : {001}
SMSInstalledSites : {}
SMSResidentSites : {001}
SMSUniqueIdentifier :
SMSUUIDChangeDate :
SNMPCommunityName :
SuppressAutoProvision :
SystemContainerName : {}
SystemGroupName : {}
SystemOUName : {}
SystemRoles : {AI Update Service Point, SMS Component Server, SMS Distribution Point, SMS Dmp
Connector…}
Unknown :
UserAccountControl :
VirtualMachineHostName :
VirtualMachineType : 0
WipeStatus :
WTGUniqueKey :
PSComputerName : SCCMServerName