Posts Tagged Commandline

Unattended installation of a Domain Controller

Bookmark and Share

So far I’ve written about the Homelab hardware I’ve purchased and some basic configurations for my Storage and XenServers. And with the post on Sysprepping a Windows 2008 Server, I’m ready to build my Windows 2008 Test environment. With a (sysprepped) Windows 2008 Template for my VMs, I can easily clone the needed Servers and get my lab up and running and build a Windows Domain with multiple Servers and ServerRoles.

The first step in building my Windows Domain is to convert a Windows Server 2008 Member Server into a Domain Controller with the dcpromo.exe command.

 

This post is my own personal mental note for the unattended installation of my Windows Server 2008 Domain Controllers.

 
Read the rest of this entry »

Tags: , ,

diskpart.exe CommandLine Interface

Bookmark and Share

The easiest way to connect to you iSCSI storage LUNs from Windows Server 2008 is by using the iSCSI initiator GUI. With the GUI you can easily make a connection with your iSCSI Storage by giving the ip-address and dynamically discover the LUNs (or Volumes) it has to offer.

As I’m working on scripts to automate the installation and configuration of Windows Server 2008 systems, I was also looking for a way to configure the local disks and volumes of a Server, without having to use the GUI and manual instructions. Luckily Windows offers some nice tools for scripting. The scripting and configuration of the local disks and volumes can best be done with diskpart.exe. Which offers it’s own commandline interface and the option to use a preconfigured script with all the commands.

 

This post offers step-by-step instructions for the diskpart.exe command.

 

This article is updated with additional diskpart command information, provided by Olav Meijer.
The additions to the diskpart sample scripts are marked in red.
 

 
Read the rest of this entry »

Tags: , ,

Add Windows 2008 Firewall rule with CLI

Bookmark and Share

For security reasons it is wise to keep your Windows firewall turned on. Even internal networks are not free of hack attempts. So to make sure the installed programs are functioning with the firewall turned on, you have to do your research on the communications that will occure between server and client (or other servers).
With an interest in automated installations, scripted installations and other unattended installations, I was looking for a commandline interface that would allow me to script the creation of the neccessary Windows Firewall rules for my applications.

 

For a list of known TCP and UDP IP ports you can easily check wikipedia or The Internet Assigned Numbers Authority (IANA).
 

 

This post is my own personal mental note for creating Windows Firewall rules with the NETSH commandline interface.

 
Read the rest of this entry »

Tags: , ,

Windows Server 2008 iscsicli.exe CommandLine Interface

Bookmark and Share

The easiest way to connect to you iSCSI storage LUNs from Windows Server 2008 is by using the iSCSI initiator GUI. With the GUI you can easily make a connection with your iSCSI Storage by giving the ip-address and dynamically discover the LUNs (or Volumes) it has to offer. With the Windows Server 2008 R2 Core edition, you can start the GUI with iSCSICPL.exe.
In case you do not have the option to use the GUI (Core Server or when scripting the configuration), you can use the CommandLine Interface (CLI) Windows Server 2008 has to offer by default.

The iscsicli.exe command of Windows Server 2008 allows you to use the Microsoft iSCSI initiator without the GUI. Making it the perfect tool for scripting the iSCSI connections (Hyper-V Server shared storage). If you know the ip-address of your iSCSI storage and the IQN of the LUN you want to use (though it can be found with the command), you are all set to set up the connection and use your shared storage.

 

This post offers step-by-step instructions for the iscsicli.exe command.

 
Read the rest of this entry »

Tags: , ,

xe.exe CommandLine Interface

Bookmark and Share

A XenServer can be managed with the xe Commandline Interface (CLI). Which can be run locally at the command prompt of the XenServer Console within XenCenter.
The ex.exe is also part of the XenCenter installation and allows and administrator to remotely manage a XenServer from the command prompt of the Windows desktop. With the CLI you can easily script some of the common tasks to perform on a XenServer.

Each xe.exe command starts with the connection settings for the XenServer (Pool Master), followed by the specific command(s) to be performed.
 

C:\Program Files\Citrix\XenCenter>xe.exe -s [xenserver] -u [user] -pw [password] [xe-commands]

 
Which uses the following syntax:

  • xenserver: ip-address or name of the XenServer (or Pool Master).
  • user: name of account used to connect to the XenServer.
  • password: password of the used account.
  • xe-commands: the commands to be performed after the connection to the XenServer (Pool Master) is made.

The rest of this post contains some examples of the different xe-commands that can be used.
 

Read the rest of this entry »

Tags: ,