Created
December 22, 2017 11:04
-
-
Save Kaidja/7c671379dfa03237723c5c5a8a095845 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$CollectionMembers = Get-CMCollectionMember -CollectionId PS10008E | |
foreach($Member in $CollectionMembers){ | |
$ResourceQuery = Get-CimInstance ` | |
-Namespace 'Root\SMS\Site_PS1' ` | |
-Query "Select * from SMS_R_System where ResourceID=$($Member.ResourceID)" | |
$ResourceQuery.ResourceNames | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment