Added from Evernote export

This commit is contained in:
DistractADD
2024-02-02 08:54:43 +10:00
parent cfddd4fad2
commit e326cd97c0
11 changed files with 1531 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
#Setting registry key to block AAD Registration to 3rd party tenants.
$RegistryLocation = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WorkplaceJoin\"
$keyname = "BlockAADWorkplaceJoin"
#Test if path exists and create if missing
if (!(Test-Path -Path $RegistryLocation)){
Write-Output "Registry location missing. Creating"
New-Item $RegistryLocation | Out-Null
}
#Force create key with value 1
New-ItemProperty -Path $RegistryLocation -Name $keyname -PropertyType DWord -Value 1 -Force | Out-Null
Write-Output "Registry key set"