Use Powershell to make your life easy.

Post on 28-Jun-2015

609 views 3 download

Tags:

description

I presented this slide at Barcamp9 event in gurgaon.

Transcript of Use Powershell to make your life easy.

welcome to

MAKE YOUR LIFE EASY WITH : POWERSHELL

Aman Dhally27th April 2013

{w}: www.amandhally.net {t}: @amandhally

{f}: http://www.facebook.com/aman.dhally

^

I.T. / admin

about me

about me.

about me

• 13+ yrs. Of experience in I.T.• Mainly works on Microsoft windows

platform.• Founder of “New Delhi Powershell User

Group”.• Writes articles on www.amandhally.net• Loves to write script and upload them at

TechNet.

“Our Current Position {status}”

not Facebook one,

current position

• Tired doing same stuff again and again.• Angry?, stuff is not working the way we want.• No time for learning new stuff.• Work load?

“what ‘we’ ideally want{status}”

what we wants

• Spending more time with the family, rather then at office doing manual work,

• Learning about new stuff , new technologies,• Engaging in leisure activities.

If not, then at least we deserve this.

• OR• At be least worry free and have some free time at office.

:o)

Seems, good, but how?

automation

• Let computer do , what they are suppose to do “to make our life easy.”

• Get rid of all manual task and try to automate using scripts as much as you can.

• Make script your best friends.• Write One and use anywhere you want and at anytime. • Use Powershell, it is very modular scripting language. • Use Powershell Cmdlets.

{ powershell scripting? No way, it is very hard }

It’s easy and

{show me, why should I believe you}

easy scripting

• 20 Lines of code versus one liner cmdlet in Powershell

time saving

• To Find laptop serial number• Process

• Power off the laptop• Turn it backward• Check at the bottom• Turn it on

• Time spent : approx 10 minutes

• Lets use powershell• Run the cmdlet Get-WmiObject win32_ComputerSystemProduct | select Vendor,Version,Name,IdentifyingNumber,UUID

time saving• To Find installed RAM serial number and bank

• I am sure you know the procedure.

• Lets use powershell• Run the cmdlet get-WmiObject win32_Physicalmemory | select Caption,SerialNumber,BankLabel,Capacity,DeviceLocator,PartNumber,Speed

time saving• To check the current Static IP of the internet.

• Open www.whatismyip.com• It take some time and shows lots of unwanted

advertisements.

• Why not to use powershell.• The script just takes 4 seconds to complete

Why not to, create our own “toys” as per our needs ;)

QUESTIONS?

Thanks. {w}: www.amandhally.net {t}: @amandhally {f}: http://www.facebook.com/aman.dhally