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,34 @@
$Path = "HKLM:\SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces\tcpip*"
$Name = "NetbiosOptions"
$Type = "DWORD"
$Value = 2
Try {
$Registry = Get-ItemProperty -Path $Path -Name $Name -ErrorAction Stop | Select-Object -ExpandProperty $Name
$Counter = 0
Foreach ($Entry in $Registry )
{
If ($Entry -eq $Value)
{
$Counter+=0
}
else
{
$Counter+=1
}
}
if($Counter -eq 0)
{
Write-Output "Compliant"
Exit 0
}
else
{
Write-Warning "Not Compliant"
exit 1
}
}
Catch {
Write-Warning "Not Compliant"
Exit 1
}