The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

jayakandan (5) [Avatar] Offline
#1
hi
im a novice on scripting ,could you suggest me where i can start with

want to automate the sysadmin task with powershell


thanks in advance
marco.shaw (24) [Avatar] Offline
#2
Re: Novice on scripting
Buying/reading Bruce's book would be good. There are a few other good books for beginners like the PowerShell for "Absolute Beginners" one, that might get you going quicker if you are really new to PowerShell.
brucepay (155) [Avatar] Offline
#3
Re: Novice on scripting
Thanks for the plug Marco smilie As well as books, there are also lots of examples and blogs that cover PowerShell. Where to start depends largely on what your background is. The one thing that (I think) works for everybody is to just start playing with it. That's the nice thing about an interactive environment like PowerShell. Just type things into the console and you see the results immediately. No edit, save, run loop. Also, since PowerShell takes care of displaying objects for you, it's pretty easy to get going. For example, if you want to display a WMI object, just do

get-wmiobject win32_bios

No long print statements, etc.are needed to display the results.

We've also been pretty careful to make sure that whatever works on the command line will also work in a script so it's possible to build up a script one line at a time.

-bruce
marco.shaw (24) [Avatar] Offline
#4
Re: Novice on scripting
Richard Siddaway has an excellent blog on PSH. His topics very from beginner to intermediate:

http://richardsiddaway.spaces.live.com/default.aspx