You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running Windows Core Series, getting on and off the domain.
When running these commands or using them in scripts keep in mind that some may become deprecated in future versions of Windows. Best practice is to use the PowerShell commands when possible to future proof any script that use these commands. These commands were run on Windows Server 2012R2.
When running Windows Server 2012+ without a GUI note that the GUI can be reinstalled via PowerShell (Install-WindowsFeature) and a reboot.
From Windows Server core command prompt:
Display current domain information using AD management tools.
C:>POWERSHELL
PS C:>Get-ADDomain
Display domain from command prompt.
C:>WMIC COMPUTERSYSTEM LIST BRIEF
Display current logged on user’s domain.
C:>ECHO %USERDOMAIN%
Join a domain named CONTOSO.
C:>POWERSHELL
PS C:>Add-Computer -DomainName CONTOSO -Restart
Join a workgroup named WORKGROUP.
C:>POWERSHELL
PS C:>Add-Computer -WorkGroupName WORKGROUP
Unjoin server from the current domain using the contoso\administrator account.
Running Windows Core Series, getting on and off the domain.
When running these commands or using them in scripts keep in mind that some may become deprecated in future versions of Windows. Best practice is to use the PowerShell commands when possible to future proof any script that use these commands. These commands were run on Windows Server 2012R2.
When running Windows Server 2012+ without a GUI note that the GUI can be reinstalled via PowerShell (Install-WindowsFeature) and a reboot.
From Windows Server core command prompt:
Display current domain information using AD management tools.
C:>POWERSHELL
PS C:>Get-ADDomain
Display domain from command prompt.
C:>WMIC COMPUTERSYSTEM LIST BRIEF
Display current logged on user’s domain.
C:>ECHO %USERDOMAIN%
Join a domain named CONTOSO.
C:>POWERSHELL
PS C:>Add-Computer -DomainName CONTOSO -Restart
Join a workgroup named WORKGROUP.
C:>POWERSHELL
PS C:>Add-Computer -WorkGroupName WORKGROUP
Unjoin server from the current domain using the contoso\administrator account.
C:>POWERSHELL
PS C:>Remove-Computer -UnjoinDomaincredential CONTOSO\Administrator -Passthru -Verbose -Restart
If you know any other interesting ways of getting this information from a Windows Server core installation post below.
The text was updated successfully, but these errors were encountered: