Getting Started with Windows PowerShell


Firstly you have to Install PowerShell

In this lab scenario Window 8.1 operating system is used. Since windows 8.1 comes with pre-installed PowerShell you can skip this step. For earlier versions such as Windows Vista you need to download and install PowerShell.

Download Link:

To Check the PowerShell version



get-host |select-object version 

get-host version



Set PowerShell’s Execution Policy

  • Restricted – PowerShell won’t run any scripts. This is PowerShell’s default execution policy.
  • AllSigned – PowerShell will only run scripts that are signed with a digital signature. If you run a script signed by a publisher PowerShell hasn’t seen before, PowerShell will ask whether you trust the script’s publisher.
  • RemoteSigned – PowerShell won’t run scripts downloaded from the Internet unless they have a digital signature, but scripts not downloaded from the Internet will run without prompting. If a script has a digital signature, PowerShell will prompt you before it runs a script from a publisher it hasn’t seen before.
  • Unrestricted – PowerShell ignores digital signatures but will still prompt you before running a script downloaded from the Internet.
  • Bypass – Everything runs without a warning. Be careful with this one.
  • Undefined – No policy is defined in the current scope. This is used to allow fall-back to policies defined in lower scopes (more details below) or to the OS defaults.

Check the current policy


01 get policy

Change the policy into RemoteSigned

Set-ExecutionPolicy RemoteSigned

02 set policy

Run Your First PowerShell script

Create a script file with following content. Name the file as MyScript.ps1

Write-Host "Hello, world"

Save the MyScript.ps1 file into following folder


03 capture

Run Following commands at PowerShell

PS C:\> Set-Location C:\Scripts

PS C:\Scripts> .\MyScript.ps1

04 run script

Alternatively you can use cmd.exe to run the scripts

In this case following script is used to get the information.

computer hostname = w

$computers = "w"

Get-WmiObject -Class win32_bios -cn $computers |

Format-table __Server, Manufacturer, Version -AutoSize

05 cmd prompt

You can use PowerShell scripts against Multiple Computers

In this scenario Windows Server 2012 R2 server domain environment is used to run the scripts.

Save following script in MyScript.ps1 file.

$computers = Get-Content -Path C:\Scripts\Computers.txt

Get-WmiObject -Class win32_bios -cn $computers -EA silentlyContinue |

Format-table __Server, Manufacturer, Version –AutoSize

Watermark Multiple Computers MyScript script file

And Make sure the computers list in the network is saved as a text file in Computers.txt.


Computers list Text File.png

The path of the text file should be


Run the PowerShell script

PS C:\> Set-Location C:\Scripts

PS C:\Scripts> .\MyScript.ps1

Watermark Multiple Computers powershell


How To Install CentOS 7 by manually Creating LVM Linux Partitions


What Is CentOS?

The CentOS Project is a community-driven free software effort focused on delivering a robust open source ecosystem.

Find more at:

Lab Configuration

In this lab scenario 32 Gb hard disk is used to manually create LVM (Logical Volume Manager) Linux partitions namely boot, swap, root, home, var, srv and tmp. Feel free to adjust the sizes of the partitions accordingly to the requirement of your organization.


Firstly download CentOS 7 at and create bootble CD/DVD

Select Install CentOS 7

CentOS 64-bit-2017-05-19-05-42-39

CentOS 64-bit-2017-05-19-05-43-09

Choose the language and press continue

Watermark CentOS 64-bit-2017-05-19-05-44-58

Watermark CentOS 64-bit-2017-05-19-05-52-35

Watermark CentOS 64-bit-2017-05-19-05-52-36.png

Date & Time

CentOS 64-bit-2017-05-19-05-52-45

Language Support

CentOS 64-bit-2017-05-19-05-53-48

Keyboard Layout

CentOS 64-bit-2017-05-19-05-54-04

Installation Source

CentOS 64-bit-2017-05-19-05-54-12

Software Selection

In this scenario minimal install is selected

Watermark CentOS 64-bit-2017-05-19-05-54-21.png

Installation destination

In this tutorial LVM Linux partitions are created manually

If you are going to create the root (/) partition as a LVM, be sure to create a standard /boot partition separately to keep the boot files and the Linux kernel because the system cannot boot form LVM partitions.

Watermark CentOS 64-bit-2017-05-19-06-35-25

Create The Standard Partition

Create a Standard Boot Partition

Mount Point: /boot
Desired Capacity: 250mb
Device Type: Standard Partition
File System: ext4
Label: boot

CentOS 64-bit-2017-05-19-09-18-21

CentOS 64-bit-2017-05-24-01-30-56

CentOS 64-bit-2017-05-24-01-32-18

Press Update Settings

CentOS 64-bit-2017-05-24-01-35-03

Create The New LVM PV And Rest of The Partitions

Root  partition

Mount Point: /
Desired Capacity: 5 GB
Device Type: LVM [new LVM PV should be created – NewLVM-PV]
File System: ext4
Label: root

CentOS 64-bit-2017-05-24-10-31-43

Create a new LVM PV – NewLVM-PV

CentOS 64-bit-2017-05-24-10-32-54

CentOS 64-bit-2017-05-24-10-33-41

CentOS 64-bit-2017-05-24-10-34-17

Swap partition

Desired capacity is calculated according to the system RAM. If the system RAM is less than 2 GB it should be multiplied by 2, if the system RAM is more than 2 GB, should add 500 mb to the system RAM.

EX -:
system RAM is 250 mb —> Desired Capacity is 500 mb [250 mb * 2]
system RAM is 3 GB —> Desired Capacity is 3.5 GB [3 GB + 500 mb]

Mount Point: not mounted or labled
Desired Capacity: 2 GB [since the system RAM is 1 GB, 1 GB mulitiplied by 2]
Device Type: LVM [NewLVM-PV]
File System: swap
Label: swap

CentOS 64-bit-2017-05-24-10-34-40

CentOS 64-bit-2017-05-24-10-35-35

Home partition

Mount Point: /home
Desired Capacity: 4 GB
Device Type: LVM [NewLVM-PV]
File System: ext4
Label: home

CentOS 64-bit-2017-05-24-10-35-57

CentOS 64-bit-2017-05-24-10-36-49

Tmp partition (optional)

Mount Point: /tmp
Desired Capacity: 2 GB
Device Type: LVM [NewLVM-PV]
File System: ext4
Label: tmp

CentOS 64-bit-2017-05-24-10-37-19

CentOS 64-bit-2017-05-24-10-38-01

Var partition (optional) on web and mail servers (LVM)

Mount Point: /var
Desired Capacity: 3 GB
Device Type: LVM [NewLVM-PV]
File System: ext4
Label: var

CentOS 64-bit-2017-05-24-10-38-27

CentOS 64-bit-2017-05-24-10-39-02

Srv partition (optional) on FTP servers (LVM)

Mount Point: /srv
Desired Capacity: 3 GB
Device Type: LVM [NewLVM-PV]
File System: ext4
Label: srv

CentOS 64-bit-2017-05-24-10-39-24

After creating required partitions press Done

Watermark CentOS 64-bit-2017-05-24-10-40-03

Select Accept Changes

Watermark CentOS 64-bit-2017-05-24-10-40-53

Press Begin Installation

CentOS 64-bit-2017-05-24-10-40-58

Configure Root account password to complete installation

last 1

last 2

Press Finish Configuration

last 3

Press Reboot

last 4

After The REBOOT

After the reboot, login to the root account using the password given

CentOS 64-bit-2017-05-24-05-46-10

To view the file system table use the command [find more at:]

cat /etc/fstab

A file named /etc/fstab lists the devices (typically hard disk partitions) that are to be mounted at boot time.

CentOS 64-bit-2017-05-24-07-28-32

CentOS 64-bit-2017-05-24-07-24-45

To view users

cat /etc/passwd

CentOS 64-bit-2017-05-24-09-11-42

To view created groups

cat /etc/group

CentOS 64-bit-2017-05-24-10-18-59

How to Reset Administrator Password in Windows Server 2012 R2


In this scenario Password for the administrator account is incorrect and you will have to reset the password

2012 AD-2017-06-04-04-11-12

Boot the Windows Server 2012 R2 from CD/DVD

Enter Your Language and other preferences and Click Next

2012 AD-2017-06-04-06-04-01f


Repair Your Computer

2012 AD-2017-06-04-06-04-14

Select Troubleshoot menu

Watermarked 2012 AD-2017-06-04-06-25-47


Select Command Prompt menu

2012 AD-2017-06-04-06-06-25

Run the following commands at the Command Prompt

cd windows\system32 
ren Utilman.exe Utilman.exe.old 
copy cmd.exe Utilman.exe

2012 AD-2017-06-04-06-25-39

Press Windows Key + U and in the command prompt include the following commands. In this case Abcd@1234 is the administrator password.

net user administrator Abcd@1234


2012 AD-2017-06-04-06-32-05

Close the command prompt and login using the given password

2012 AD-2017-06-04-06-34-17

2012 AD-2017-06-04-06-34-30



Guide To Understand ITIL Processes


The ITIL V3 is comprised of five publications,

  • Service strategy
  • Service design
  • Service transition
  • Service operation
  • Continual service improvement
ITIL processes by National University of Singapore

Service Strategy

Service strategy helps building strategic assets which add value to business guides entire Service Design, Service Transition & Service Operation in a coherent manner for effective service operations

Processes in Service strategy

  • Strategy management for IT Services
  • Service portfolio management
  • Financial management for IT services
  • Demand management
  • Business relationship management

Service Design

The objective of the service design is to design IT services so effectively that minimal improvement during their life cycle will be required. However, continual improvement should be embedded in all service design activities

Processes in Service Design

  • Design coordination
  • Service catalogue management
  • Service-level management
  • Availability management
  • Capacity management
  • IT service continuity management
  • Security management
  • Supplier management

Service Transition

Objectives of service transition includes Resource Management, Increase satisfaction of transition experience, Minimize impact on production environment during transition period.

Processes in Service Transition

  • Transition planning and support
  • Change management
  • Service asset and configuration management
  • Release and deployment management
  • Service validation and testing
  • Change evaluation
  • Knowledge management

Service operation

The purpose of the service operation stage of the service life cycle is to coordinate and carry out the activities and processes required to deliver and manage services at agreed levels to business users and customers.

Processes in Service Operation

  • Event Management
  • Access Management
  • Request Fulfillment
  • Problem Management
  • Incident Management

Continual service improvement

Continual Service Improvement describes best practice for achieving incremental and large scale improvements in service quality, operational efficiency and business continuity and for ensuring that the service portfolio continues to be aligned to business needs.


How To Install Citrix XenCenter 7.1.0


XenCenter is the management GUI for XenServers that runs on Windows. This is the front end that lets users configure new virtual machines and enables full virtual machine installation, configuration, administration, and lifecycle management.


click Next in the Citrix XenCenter Setup Wizard

watermarked windows-7-x64-ulti-client-2017-04-29-19-42-23


Select the Features/ locations/ install for all users

watermarked windows-7-x64-ulti-client-2017-04-29-19-43-36

Windows 7 x64 ulti client-2017-04-29-19-43-36

Start Installing

Windows 7 x64 ulti client-2017-04-29-19-43-47

Press Finish and end the installation process

Windows 7 x64 ulti client-2017-04-29-19-46-03

Open Citrix XenCenter

Windows 7 x64 ulti client-2017-04-29-19-47-48

Windows 7 x64 ulti client-2017-04-29-19-47-56

Windows 7 x64 ulti client-2017-05-10-17-26-25

How To Install Citrix XenServer 6.5


In this tutorial Citrix Xenserver 6.5 is installed

Select the proper keyboard layout


Press OK to proceed


Accept the end user license agreement


Select Local Media as the source


In this case supplement packs are not selected


Installation Source is verified in this case


Remember the password given here. This is needed when connecting to the XenServer host


Choose between DHCP and Static. If static is selected provide the necessary IP addresses


Provide the Hostname and DNS configuration



Select the appropriate geographical area


Select the Time Zone


Select the proper method to set System Time. In this case NTP is used.


NTP server is address is given


Install XenServer



Press OK to reboot and make sure to remove the CD/DVD/removable media


Press any key to access the console




Congratulations XenServer is installed

How to Add Users With Windows PowerShell in Server 2016


In this tutorial basic PowerShell is used to create Active Directory users in Windows Server 2016

PS C:\> New-ADUser -Name “Jake Lawrence” -GivenName Mike -Surname Lawrence -SamAccountName Mike -UserPrincipalName

2016 AA AD-2017-04-24-17-51-22.png

2016 AA AD-2017-04-24-17-55-56

2016 AA AD-2017-04-24-18-06-54

watermark 2016-aa-ad-2017-04-24-18-12-30

Provide a password for the account

-AccountPassword (Read-Host -AsSecureString “AccountPassword”)

2016 AA AD-2017-04-24-18-24-07.png

Specify a path

-Path ‘OU=Company,DC=teche,DC=lk’

To enable the user account

-PassThru | Enable-ADAccount

To add bulk users

PS C:\> Import-Csv C:\users.csv | New-ADUser -PassThru | `

Set-ADAccountPassword -Reset `

-NewPassword (ConvertTo-SecureString -AsPlainText ‘Pa$$w0rd’ -Force) `

-PassThru | Enable-ADAccount

Create a .csv file with following format (MS Excel application is used)

kamal Deshapriya,kamal,Deshapriya,kamal,

csv file.png

watermark 2016-aa-ad-2017-04-24-18-51-24.png

How to Install NethServer




What is NethServer?

NethServer is an operating system for Linux enthusiasts, designed for small offices and medium enterprises.

Available Features

Watermark NethServerorg_learn-more - features.pngPrerequisites

  • 64 bit CPU
  • 1 GB RAM
  • 8 GB free disk space

In this tutorial NethServer 6.8 is installed.


Download link

Boot the downloaded ISO image from CD/DVD/USB

Choose NethServer interactive install

Watermark  NethServer-2017-04-17-09-28-22.png



Choose the correct LAN, MAC address


Give an appropriate IP address (EX-




Use following credentials

Default username : root
Root password : Nethesis,1234



You can change the root password with following commands in command line or wait and do that in the Server Manager.

passwd root

New password:
Retype new password:

To access NethServer’s Server-manager use the following address in the web browser (change the ip address accordingly)

Watermark  Windows 7 x64 xxx [17]-2017-04-18-02-14-22.png

Windows 7 x64 xxx [17]-2017-04-18-02-15-24.png

Change the root password

Windows 7 x64 xxx [17]-2017-04-18-02-17-54.png

Change the Hostname and the domain name

Windows 7 x64 xxx [17]-2017-04-18-02-19-23.png

Time Zone

Windows 7 x64 xxx [17]-2017-04-18-02-20-45.png

Change the SSH TCP port number or keep the defaults. Changing is recommended because of security reasons.

Windows 7 x64 xxx [17]-2017-04-18-02-20-54.png

Usage statistics will be sent to by default. Select “No Thanks” if you don’t like the option.

Windows 7 x64 xxx [17]-2017-04-18-02-21-03.png

Apply the changes.

Windows 7 x64 xxx [17]-2017-04-18-02-21-09.png

make sure you update using following command

yum update



How to Install NethServer Web Proxy



Select and Install Web Proxy from administration –> Software Center

Watermark Windows 7 x64 xxx [17]-2017-04-19-09-21-31.png

Select Gateway –> Web Proxy

Windows 7 x64 xxx [17]-2017-04-19-09-55-07.png

Supports Four modes

  • Manual: all clients must be configured manually
  • Authenticated users must enter a user name and password in order to navigate
  • Transparent: all clients are automatically forced to use the proxy for HTTP connections
  • Transparent SSL: all clients are automatically forced to use the proxy for HTTP and HTTPS connections

Windows 7 x64 xxx [17]-2017-04-19-09-56-21.png

Configure cache settings too

Windows 7 x64 xxx [17]-2017-04-19-13-10-07.png

Configure the proxy settings in Client Computers. (Proxy server’s listening port is 3128)

Internet Explorer

Tools –> Internet Options –> Connections –> LAN Settings

Watermark Windows XP Pro client [77]-2017-04-19-09-36-38.png


Tools –> Options –> Advanced –> Network –> Settings

Windows XP Pro client [77]-2017-04-19-13-05-06.png


If you want you can Install nethserver-lightsquid package to generate web proxy stats.