Tuesday, July 16, 2013

Powershell and Active Directory : Find empty Active Directory Groups using Powershell.

Hi Everyone.

Finally i come back to India and it is always love to be at home.

My today’s task was to create a list of all empty active directory groups, all groups those are not having any members.

As you know, i don’t like to do the manual tasks, so i decided to use powershell to accomplished this.

Lets do it.

Import Active Directory module.

Import-Module ActiveDirectory

12-07-2013 14-18-16

Once, Active Directory Module is loaded, run the below command.

 

Get-ADGroup -Filter * -Properties Members  | where { -not $_.Members} | select Name

Now , this will give you the list of all empty groups.

Now we have two groups “*ASKLAILA” and “*Hello Sir” as a result of the above command.

12-07-2013 13-56-01

Now lets cross-verified our result.

12-07-2013 13-57-05

12-07-2013 13-56-20

I hope you find this useful.

Thanks
Aman Dhally
 
 
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Wednesday, July 3, 2013

Powershell Script : Get the file and Product version of Ms office Applications.

Hi,

I hope you guys are doing good.

My last two months were very busy, that why i was not able to post any article. I apologize for that.
Last week Microsoft has release few mandatory ms office update.

That update was crucial for outlook users, before apply ms office updates, we need to know, which outlook version and build my users are using.

To achieve it, i have written a tiny “Powershell” script. when you run the script, that will give you the file version and product version information of WORD, EXCEL, POWERPOINT and outlook.

2

Download Link http://gallery.technet.microsoft.com/scriptcenter/Get-Offie-Applications-5c0bb2e1

I tested this script on “office 2010 32 bit” on windows 7 32 bit.
I hope you may like the script and found it helpful.
Thanks
Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Monday, April 29, 2013

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

Hi

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.

BCD9Goodies

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 : http://www.slideshare.net/amandhally/use-powershell-to-make-your-life-easy

 

Thanks
Aman Dhally
 
 
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Tuesday, April 23, 2013

Powershell Script : Stopwatch

Hi,

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.

Anyway.

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;
                $textBox1.ScrollToCaret()

  •  

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 : https://dl.dropboxusercontent.com/u/17858935/StopWatch-Community-Edition.zip

 

Thanks
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 : http://barcampdelhi.org/

My session Details : http://connect.barcampdelhi.org/session/73

Registration : http://connect.barcampdelhi.org/Account/Register.aspx

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

See you there….. :o)

Thanks
Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Powershell Event Pictures and Presentation of Delhi User Group.

Hi,

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.

Pics:

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 :

  1. http://gallery.technet.microsoft.com/Ping-Multiple-Servers-ba915a7c
  2. http://gallery.technet.microsoft.com/Ping-Multiple-Server-Using-4f4d3dd0
  3. http://gallery.technet.microsoft.com/Ping-Multiple-Servers-and-df50cd28

Slide : https://dl.dropboxusercontent.com/u/17858935/DelhiUserGroupPresentation-April2013.zip

Thanks
Aman Dhally
 
 
clip_image001 clip_image002 clip_image003 clip_image005clip_image007