Press "Enter" to skip to content

Getting started with Windows Server command line

Shahriar 0

Hello everyone, In this post I am going to introduce some basic commands that are used to configure Windows Server. Of course if you are using Windows Server with GUI, you may not need these command at all (except for automation maybe).
However if you work in an environment in which you configure windows network on a regular basis, you need to know some basic stuff B)

OK,
Imagine you have installed Windows Server Core 2012 R2 on a server and now want to set basic configuration of your server (It’s highly possible that other versions of windows are configured exactly the same (like even windows 7 etc), but It is not tested by me):

Network:

Hostname:

(you should reboot after setting hostname)

reboot:

okay, now we want to join this computer to a domain:

Joining to a domain:

(you should reboot after joining to domain)

Installing a Role:

well, windows server is of no use without any roles installed. So as an example we will install Internet Information Services (IIS):

Enable PowerShell Remoting:

PowerShell remoting enables you to run powershell command over the network on other computer. I know many powershell or cmd command for management have -ComputerName or similar argument for specifying the destination computer, but most of them work over non-standard ports and each of them may use a different microsoft remote managemnt facility. Furthermore you may run into strange permission or other problems. So it won’t result in a smooth remote exprience.

To enable PS Remoting run this command

(it can be enabled with Group Policy if you have a lot of systems to manage remotely):

then connect to them like this:

or if you want to run a command of multiple machines in parallel:


That is the end of this post! Please feel free to comment below.

Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *