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

26
dump/SCCM-Tool/test1.ps1 Normal file
View File

@@ -0,0 +1,26 @@
$NotResponding = @()
$Ping_Result = @()
$Script:DeviceCollection_ServerNames1.Name | % {
$Server = $_
$Obj = New-Object -TypeName PSObject
If (Test-Connection $Server -Count 1 -ErrorAction SilentlyContinue ) {
#Write-Host "Responding:---- $_ " -ForegroundColor Green
#$Script:Output.AppendText("Responding: $_")
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "Yes"
$Ping_Result += $Obj
}#endIf
Else {
$NotResponding += $Server
$Obj | Add-Member -MemberType NoteProperty -Name Server -Value $Server
$Obj | Add-Member -MemberType NoteProperty -Name Responding -Value "No!"
$Ping_Result += $Obj
}
}#end%
$Ping_Result
$NotResponding