Microsoft Tech Guru

All things Microsoft!


Advanced Online Solutions

Our service comes packed to the brim with tons of amazing features.

Manage FSMO Roles with Powershell

Manage FSMO Roles with Powershell

To transfer all 5 of the FSMO roles simply run the following command in PowerShell: Move-ADDirectoryServerOperationMasterRole -Identity “DC_HOSTNAME” –OperationMasterRole PDCEmulator,RIDMaster,InfrastructureMaster,SchemaMaster,DomainNamingMaster To shorten the command line syntax you can use role numbers in place of the role names.  The following list details the role number for each of the five FSMO roles. PDC Emulator – 0 RID Master – 1 Infrastructure Master – 2 Schema Master – 3 Domain Naming Master – 4 Using numbers instead you would run the following command in PowerShell: Move-ADDirectoryServerOperationMasterRole -Identity “DC_HOSTNAME” –OperationMasterRole 0,1,2,3,4 Now in my case since the DC was gone permanently I had to seize the roles using the –Force parameter.  This is the PowerShell command I ran to seize the roles: Move-ADDirectoryServerOperationMasterRole -Identity “DC_HOSTNAME” –OperationMasterRole PDCEmulator,RIDMaster,InfrastructureMaster,SchemaMaster,DomainNamingMaster -Force Using numbers instead you would run the following : Move-ADDirectoryServerOperationMasterRole -Identity “DC_HOSTNAME” –OperationMasterRole 0,1,2,3,4...

More Information
List FSMO Roles

List FSMO Roles

This tip explains several ways to check FSMO Roles availability in an Active Directory Forest environment.   To get the list of FSMO Roles using NetDom command line tool, run the following command: Netdom Query FSMO And using DSQuery tools DSQuery server –hasfsmo –pdc DSQuery server –hasfsmo –infr DSQuery server –hasfsmo –rid DSQuery server –hasfsmo –name DSQuery server –hasfsmo –schema DSQuery command returns the FSMO holder name but in the DN format. The DN format looks like below:...

More Information
Offline Mssql 2014, 2012, 2008, 2005 Database

Offline Mssql 2014, 2012, 2008, 2005 Database

Offline database and gracefully close connections : ALTER DATABASE "DATABASE_NAME" SET OFFLINE 12 ALTER DATABASE "DATABASE_NAME"SET OFFLINE   Offline database and close all connections immediately : ALTER DATABASE "DATABASE_NAME" SET OFFLINE WITH ROLLBACK IMMEDIATE 12 ALTER DATABASE "DATABASE_NAME"SET OFFLINE WITH ROLLBACK IMMEDIATE...

More Information