Monday, April 29, 2013

Powershell Event : Barcamp9’s Powershell’s Session slides.


On Saturday i had a great day at “Barcamp9”. It was a successful event and this event is very well planned and very well managed by the event organizers.

In the “Barcamp9 Event”, we got lot’s of nice goodies like Barcaml9 printed T-Shirts, firefox sticker, magnet and pen.


unfortunately, no one was there to take my pictures , so i don’t have any of my event pics :(

You can download the event's slides from the below link.

29-04-2013 22-34-41

Download presentation from this link :


Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Tuesday, April 23, 2013

Powershell Script : Stopwatch


Few days back I upload a script on “Powershell Digital Clock”, when i was writing that script at that time another script idea strike in to my mind, that ideas was to create a Stopwatch using Powershell.

I don’t know writing a script for stopwatch is a good idea or not, but i know one thing that i will learn a new thing and that may be helpful in the future.

After thinking i started writing an GUI based script to creating a stopwatch.

Powershell has open lots of possibilities for system administrators like me. We just need to imagine what we want and we able to achieve it easily using Powershell.

Last week when i take a session in Delhi User Group meeting, i told attendees that Powershell is the most easiest scripting language to be learn.


In this “Stopwatch” i used 4 buttons, one to start the clock, One to stop the clock , one to reset the stopwatch and another is for the lap.

I am not so good in designing GUI so ignore the colour of the buttons ;o).

In this script i learn few new things.

Lesson Learned:

  • System.Diagnostics.Stopwatch class
  • Few methods of System.Diagnostics.Stopwatch class
  • Make multiline textbox in powershell to auto scroll using
              • $textBox1.SelectionStart = $textBox1.Text.Length;


23-04-2013 22-51-47 23-04-2013 22-55-52  

“Screenshot of the script”

Please run this script in –Sta mode

23-04-2013 22-54-51

Download Link :


Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Monday, April 22, 2013

Join me at Barcamp9 on 27th April 2013

Barcamp, Barcamp9, Powershell Event, PowershellHi Everyone,

This weekend i am doing another session on Powershell at barcam9. Please register for the event.

The topic for Powershell Session is : “Use Powershell to ease your life. ”

Website Link :

My session Details :

Registration :

SAP Labs India Pvt. Ltd.
Vatika Towers, 4th Floor
Sector 54, Golf Course Road
Gurgaon, Haryana – 122002

See you there….. :o)

Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Powershell Event Pictures and Presentation of Delhi User Group.


On 20th April we had a half day Delhi user group meet at Microsoft office at Gurgoan.

I had a lots of fun there, I meet with different users, and some awesome Microsoft MVP’s.

To know about  upcoming Powershell events is Delhi/NCR area try to check my blog and stay tuned with Powerscripting Podcasts.


58116_441432729274149_718457716_n 58147_441432602607495_419388326_n 165439_441432519274170_2144479977_n 315545_441432485940840_1581015439_n 387207_441432725940816_1005066017_n 422057_441432675940821_1888033258_n 431901_441435655940523_311193387_n 532951_441432539274168_357428892_n 931328_441434869273935_2117386856_n 934714_441432415940847_1983755948_n 934886_441432525940836_153967980_n 935140_441432575940831_2125295255_n 935274_441432442607511_1286611190_n

Script Showed in the Presentation :


Slide :

Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Monday, April 15, 2013

Samay : Powershell script based digital clock.


Few days back i was writing an powershell GUI based script, in that script I need to add a clock.

First i thought how can i make a clock? I was thinking about an hour and then i got an idea. why not to use timer object and use it for creating an clock.

This is what i have done to create a GUI clock.
  1. Created a blank form on “Powershell Studio”
  2. Add a blank label to it
    1. 15-04-2013 23-12-48
  3. Added a time object to it.
    1. 15-04-2013 23-13-18
  4. In timer object property , i set Enabled to true, and interval to 1 {which is very low because the it is in milliseconds}
  5. Double click on “Timer” object and i added the below code.
  6. 15-04-2013 23-11-16
  7. In above code , i am just converting, Get-Date to string.
  8. and when you run scrip the outcome is running Powershell Digital clock.
15-04-2013 23-03-59

You can download the script from here:

Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Download Link :

Powershell Event in Delhi User Group Meet.


Hi there!
For the month of April, Delhi User Group brings you a chance to learn enterprise-grade Microsoft technologies like PowerShell and SQL Server.

The half-day free event for professional developers in Delhi NCR includes a great line-up of industry-recognized speakers.

REGISTER | Registration required | Limited seats only

9:00 AM – 10:00 AM | Registration

10:00 AM – 10:45 AM
Automate your manual tasks with PowerShell
Aman Dhally

10:45 AM - 11:30 AM
SQL Server Databases: A Primer
Ahmad Osama

11:30 AM - 12:15 PM
Nuts and Bolts of Security in SQL Server 2012S
Sarabpreet Singh

12:15 PM - 12:30 PM

12:30 PM - 1:15 PM
Exciting features for Devs in SQL Server 2012 + Demos
Brij Bhushan Mishra

1:15 PM - 2:00 PM
Data as a Service in .NET
Dhananjay Kumar

Saturday | April 20, 2013

DLF Cyber Greens
9th Floor, Tower A
DLF Cyber City
Sector 25A

Nearest Metro Station:
Sikandarpur (Yellow Line)

Rishu Mehra
+91 9818562858


Tuesday, April 2, 2013

using Get-Location cmdlet in PowerShell.

Hi everyone.

Sometime, while using our regular or favourite cmdlets, we often forget to use non-regular, non-common cmdlets. When you look in to all cmdlets which powershell offers, you can see there may be few cmdlets which you never used and never notice them.

One of the cmdlet which i came to know is “Get-Location” whose alias is “pwd” (present working directory)

As its name defines , when you run it, it shows your location (not GPS one :D ), it shows you that  in which folder you currently working in.

02-04-2013 17-47-37

this cmdlet is very useful when you want to record you current folder location in to the powershell scripts.

This cmdlet has three main properties.

  1. Path
  2. Drive
  3. Provider

To check these properties we can put Get-Location in to a variable.

$location = Get-Location

02-04-2013 17-49-34

to know the path of the current location we can type $location.Path property.

02-04-2013 17-49-45

To know the name and other information, we can use $location.Drive property.

02-04-2013 17-49-57

to know the PS Provider type, we can use $location.Provide property.

02-04-2013 17-50-11

That’s all for now. :)

Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007