Wednesday, January 30, 2013

Where is my Windows PowerShell Integrated Scripting Environment (ISE) on Windows8.

Two days back i finally upgraded my laptop to “Windowd8 Pro”. After clean installation of the Windows8 Operating system my first expression was “WOW!”. I like it. Windows8 Operating System really looks very cool.
After installation the first program i run was “Powershell”. Microsoft had added a lots of new cmdlets on the new version on PowerShell v3. Microsoft is shipping Windowd8 with New Windows PowerShell Integrated Scripting Environment (ISE) and this new  “Powershell ISE” contain a lots of new features.
Where is my Windows PowerShell Integrated Scripting Environment (ISE) is on Windows 8???????
After the installation of windows8 pro, i was not able to find “Powershell ISE” anywhere,
30-01-2013 10-43-12
i searched and found it under,
  • Press the “windows Key” or click on “Start” 30-01-2013 10-36-39
  • Now Move you Mouse on the Top “right “ of the corner of the screen , you that the “Right hand side” option bar comes and click on Settings.
  • 30-01-2013 10-39-07
  • Now click on”tile”
  • 30-01-2013 10-40-31
  • Change the “Show administrative tool” button from “No” to “yes”
  • 30-01-2013 10-41-49
  • and here it is our “Powershell ISE”
  • 30-01-2013 10-44-37
Lets Pin Windows PowerShell Integrated Scripting Environment (ISE)  to our taskbar so that we can access it easily.
  • Right Click on “windows Powershell ISE.
  • In the bottom you can see the “Pin to taskbar” Icon, Click on it,
  • 30-01-2013 10-45-30
  • Now we have “Powershell ISE” on our taskbar.
  • 30-01-2013 11-06-58

Aman Dhally

clip_image001 clip_image002 clip_image003 clip_image005 clip_image007

Tuesday, January 15, 2013

Powershell and Active Directory: Finding User whose password is Expired.


Yesterday i have got a call from my remote user, she is  saying that she is not able to login to the Intranet System and Outlook, I asked her if she has got any notifications about password failed (Setting using Group Policies). and she denied.

i said “OK”..

Somehow i feel this is related to her password, i thought let’s see if her password is expired or not.

The best way to check this is using “Powershell”

I opened my Powershell Console.

I imported my ActiveDirectory Module ( Import-Module ActiveDirectory )

and i shoot the command line.

Get-ADUser UserName -Properties *

14-01-2013 13-00-55

and when i scrolled down and i  seen “PasswordExpired : True

14-01-2013 13-00-19

and i call that lady over the phone and  told her to change her password.

You can also use this command line to find all users those password are expired.

Get-ADUser -Filter 'PasswordExpired -eq $true'

All Sorted… and i live “happily ever after” (till the second problem hit me Winking smile)

I love Powershell.


Aman Dhally


clip_image001 clip_image002 clip_image003 clip_image005 clip_image007

Monday, January 7, 2013

Uninstalling Windows Features using Powershell V3


In my previous post i posted about on “How to install windows features” using powershell v3. Today i am about to post about how to un-install them.

The un-installation of windows features using powershell quite easy as installing them.

Let’s start.

Lets check if we still have “XPS-Viewer” installed as feature on our windows 8 server machine.,

Get-WindowsFeature -Name "XPS-Viewer"

So XPS-Viewer is still installed.

07-01-2013 15-53-30

Now lets uninstall it using the cmdlet “Uninstall-WindowsFeature”

run  Uninstall-WindowsFeature” with -Name parameter and provide the name of the windows feature which you want to uninstall.

Uninstall-WindowsFeature -Name "XPS-Viewer"


07-01-2013 15-54-44

Now it start removing “XPC-Viewer”

07-01-2013 15-54-57

one all done this will show the success windows. you can see in the command line output the value of Success is True.

07-01-2013 15-56-13

to cross check the un-installation lets run  Get-WindowsFeature -Name "XPS-Viewer" again.

and the you can see there is no [x] boxed in the front of the “XPS Viewer” and the install state is available.

07-01-2013 15-56-31


Aman Dhally


clip_image001 clip_image002 clip_image003 clip_image005 clip_image007

Thursday, January 3, 2013

Installing Windows Features using Powershell V3


While working on Powershell V3 i have realised that Scripting are going to be easy. Scripters just need to add bunch of cmdlets to the scripts and done. In Powershell V3 Microsoft had make CMDLET for almost everything or for every task.

The main task which SYSADMINS do this installing extra windows features in to the server or to the desktops. These features may be setup a server a DHCP,DNS,FAX or a simple feature like installing or enabling XPS viewer.

I am using a fresh installation of “Windows Server 2012 Standard Edition with GUI” and i do often view and read “XPS formatted  Documents”. BY Default the XPS file viewer is not installed on “Windows server 2012”. 

So i think why not install it using the Powershell V3 cmdlet. 

To get the list of all available/installed windows feature we can use the cmdlet


The features those have [x] in the from of them means that they are installed.  When you query any single feature using  “Get-WindowsFeature” cmdlet then provide the NAME of the feature not the “Display Name”

03-01-2013 12-07-44

Let’s see if the “XPS Viewer” is installed or not.

Get-WindowsFeature -Name “XPS-Viewer”

You can see that XPS-Viewer is available but it is not installed.
03-01-2013 12-08-46

To install Windows features we have to use the cmdlet “Install-WindowsFeature

Let’ install XPS-Viewer, run the below command line.

Install-WindowsFeature -Name “XPS-Viewer”

You can see it start Installing.

03-01-2013 12-10-05

When installation is done it shows the below screen, that installation is “Successful” and Reboot is “Not required” .

03-01-2013 12-11-47
let’s query the “XPS-Viewer” again using Get-WindowsFeature

Get-WindowsFeature -Name “XPS-Viewer”

and now we can see a [x] in the front of Display Name and the Install State in “Installed”

03-01-2013 12-12-12

and we can see XPS Viewer on our Desktop too.

03-01-2013 12-13-25

Nice Smile isn’t.


Aman Dhally


clip_image001 clip_image002 clip_image003 clip_image005 clip_image007

Wednesday, January 2, 2013

Setting Display Resolution using Powershell V3


First of all I want to congratulate all new MVPs and want to thanks them their contribution to the community . I also want to congratulate “Sarabpreet Singh Anand” who became a “SQL” MVP this year for first time, brother we do proud on you.

Today “New Delhi” is feeling like a big refrigerator the temperature is almost 8 Degree Celcius and a heavy fog is every where.

02-01-2013 13-27-24


I am in love with Powershell V3, I think in this new version we have CMDLET for each and every task. Today i am going to show you a very simple task , the task in setting Display Resolution on Desktop using Powershell V3 Cmdlets.

Open PowerShell Console { You know hot to do this ;o) }

02-01-2013 13-06-19

To know you current display resolution use this cmdlet “Get-DisplayResolution”.

02-01-2013 13-07-04

So my current display resolution is “1920x1080” . Now lets change the resolution using the another cmdlet “Set-DisplayResolution

type and run “Set-DisplayResolution

it ask you to define the width of resolution in pixels : i typed 800

02-01-2013 13-07-50

after define the width in Pixels we have to provide the height pixel size of 600

02-01-2013 13-08-07

02-01-2013 13-10-01

Hit enter .

Now a new windows opens and asking for the confirmation that if we want to apply the display setting or not, if you enter “Y” new display resolution will be applied, if you enter “N” then you are back to the original display resolution nothing will be changes and if you type or enter nothing you will be back to original display settings.

In my case i type and enter “Y”

02-01-2013 13-08-32

and my display resolution is changed.

02-01-2013 13-09-36

Smile cool…..

but wait… we can make the above in to  one-liner so that we can  use this on our scripts so that it won’t ask for any confirmation window.

Set-DisplayResolution -Width 800 -Height 600 -Force

02-01-2013 13-38-52



Aman Dhally


clip_image001 clip_image002 clip_image003 clip_image005 clip_image007