Intune Initial Scripts Backup

This commit is contained in:
2025-04-21 14:21:38 -04:00
commit 71764cd10f
241 changed files with 28218 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
$Dev = "w2012a","w2012b"
$Temp = @()
$Dev | % { $S = $_
$W = (Get-WmiObject -ComputerName pncrasccm001 -Namespace root\SMS\site_ccx -Query "SELECT SMS_Collection.* FROM SMS_FullCollectionMembership, SMS_Collection where name = '$S' and SMS_FullCollectionMembership.CollectionID = SMS_Collection.CollectionID").name
$W | % {
$Obj = New-Object -TypeName PSObject
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $S
$Obj | Add-Member -MemberType NoteProperty -Name Collection -Value $_
$Obj
$Temp += $Obj
}
}#end%
#$Collections | select name