server2012With working on my MCSE for server 2012 I needed to learn how to use windows server 2012 core. unfortunately configuring basic settings from the power shell is a whole lot different than the gui. You can configure everything and then uninstall the GUI but that is not really the correct way to do it. please use the following commands to get you through the initial configuration

Rename the computer

After you install Windows Server 2012, the computer is assigned an automatically generated name. In most cases, you won’t want to keep the random name, you’ll want to assign a name for the computer that matches your organization’s naming conventions. Instead of navigating through all of the Windows UI to rename and restart the computer, try opening Windows PowerShell and typing the following commands, making sure to replace “ComputerName” with the actual name that you want to use:

Rename-Computer ComputerName

Configure a static IP address

Most servers are configured with a static IP address rather than having DHCP client enabled and receiving an IP address dynamically from a DHCP server. You can use the command below to configure the Internet Protocol version 4 (IPv4) properties of a network connection with a static IP address. Before running this command, ensure that you replace the example parameter values with values that are appropriate for your network.

New-NetIPAddress -IPAddress -InterfaceAlias “Ethernet” -DefaultGateway -AddressFamily IPv4 -PrefixLength 24

Configure a network connection with a new DNS server address

If you add a DNS server to your network, you can use the following command to configure IPv4 properties of a statically configured network connection with the IP address of the new DNS server.

Set-DnsClientServerAddress -InterfaceAlias “Ethernet” -ServerAddresses

Join a computer to a domain

To join a computer to a domain, you can run the following command after replacing the domain name with one that’s appropriate for your deployment:

Add-Computer -DomainName

When you’re prompted to do so, type the user name and password for an account that has permission to join a computer to the domain. To restart the computer, use the following command:


Install Active Directory Domain Services (AD DS) and DNS and create a new domain in a new forest

If you have a test environment, you probably recreate it on a frequent basis for new configurations and new tests. Or you might be setting up a new organization domain and network. Either way, the following commands install AD DS and DNS with a new forest, new root domain, and domain name of to help you speed-install these roles.

Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -DomainName

Note that you can install all of the Windows Server 2012 server roles by using the command Install-WindowsFeature, which really streamlines the configuration of servers.

Create a DNS Reverse Lookup Zone

After you install DNS, it’s recommended that you create a DNS Reverse Lookup Zone. You can use the following command to configure a reverse lookup zone for a network with the network ID 10.0.0.x:

Add-DnsServerPrimaryZone -ZoneFile

Create a new user account in Active Directory Users and Computers

You can use the following command – after you change the parameter values – to create a new user account in Active Directory. Keep in mind that when you run this command, you’ll need to type in the password value at the Windows PowerShell prompt, so this particular method of using this command is not intended for use in scripts.

New-ADUser -SamAccountName User1 -AccountPassword (read-host “Set user password” -assecurestring) -name “User1” -enabled $true -PasswordNeverExpires $true -ChangePasswordAtLogon $false

If you want to assign Active Directory Group membership to the account you just created, you can use this next command. This example assigns group membership to both Enterprise Admins and Domain Admins, so make sure you change these values and the domain name when you use the command, if these are not the memberships and name that you want to assign.

Add-ADPrincipalGroupMembership -Identity “CN=User1,CN=Users,DC=corp,DC=contoso,DC=com” -MemberOf “CN=Enterprise Admins,CN=Users,DC=corp,DC=contoso,DC=com”,”CN=Domain Admins,CN=Users,DC=corp,DC=contoso,DC=com”

I hope these commands help you configure your network and get started with Windows PowerShell in Windows Server 2012. Also, you can find these commands – and many more – in the Core Network Guide and Companion Guides for Windows Server 2012, which are on the Web at .


this information is from

By admin