diff --git a/AD Scripts/AD - Change FSMO Roles.ps1 b/AD Scripts/AD - Change FSMO Roles.ps1 new file mode 100644 index 0000000..612b817 --- /dev/null +++ b/AD Scripts/AD - Change FSMO Roles.ps1 @@ -0,0 +1,33 @@ +<# +Author: Gabe Kerntke +Date: 07-15-2023 + +.Synopsis + +.Modified +2023-07-15 (GabeK) - Original script created +2025-1-1 (GabeK) - Updated script to correect standards + +#> + +# Variables # + +# Functions # + +# Start Script # + +#Display server holding current FSMO roles +netdom query fsmo + +$Servername = Read-Host -Prompt "Name of server you want the roles to go to" +$ConfirmPrompt = Read-Host -Prompt "Are you sure you want to transfer FSMO Roles to '$Servername'? Please type 'Yes' to confirm." +If ($ConfirmPrompt -eq "Yes") { +Move-ADDirectoryServerOperationMasterRole -Identity $Servername -OperationMasterRole pdcemulator, ridmaster, infrastructuremaster, schemamaster, domainnamingmaster + +Start-Sleep 10 + +netdom query fsmo +} +Else {Write-Host "Operation aborted." } + +# End Script # \ No newline at end of file