/\/\o\/\/ PowerShelled

This blog has moved to http://ThePowerShellGuy.com Greetings /\/\o\/\/
$AtomFeed = ("Atom.xml")
$PreviousItems = (" PowerShell Orphan share remover Tool (Update) "," PowerShell and Active Directory Part 8 (ACL's) "," Signing PowerShell Scripts "," PowerShell and Active Directory Part 7 "," PowerShell and Active Directory Part 6 "," Windows PowerShell Video: Next Generation Command ... "," PowerShell and Active Directory Part 5 "," PowerShell and Active Directory Part 4 (TypeData) "," PowerShell and MOM2005 part 2 : Updating Settings "," PowerShell Boolean FileMode "," ")

Thursday, August 24, 2006


Powershell and hey Scripting guy !

one of my most favorite scripting sites is the Script Center on Microsoft teched.

As I said often before on my blog especialy the scripting guys items I like very much, I follow it for a long time and and I did learn a lot from it.

the first powershell examples on the scriptingcenter in the Windows PowerShell Script Repository where a bit dissapointing
see also : First Monad B3 impression and please help the scripting guys

but after some complaining : see also : PowerShell's Script Center problem
the Scripting guy made it all up see :

How Can I Use Windows PowerShell to Start a Service on a Remote Computer?
What Can I Do With Windows PowerShell?

Yesterday the scripting guy answered a Powershell Question again :
How Can I Use Windows PowerShell to Determine the Status of the Guest Account?

For the question of today in powershell see also :
How Can I Add or Subtract Two Hexadecimal Numbers?
for Powershell this looks like this :

# Add some hex numbers :

MSH>0x1C8 + 0xD201

# use the format operator :

MSH>"{0:x}" -f (0x1C8 + 0xD201)

# use the tostring overload

MSH>(0x1C8 + 0xD201).tostring('x')

need I say more ?

for more examples of formatting on the powershellconsole see also 2006 Winter Scripting Games (part 2)

So you see that its also nice to follow the examples not in Powershell and try to find a PowerShell way, I have a lot of examples of doing that, in the series about the Scripting Games I did compete in on my blog where I did al the questions also in powerShell form (MSH at the time) as all the material and origional answers are still online here : Scripting Games Home.

The PowerShell versions a made for the events you can find here : (from first to last)
2006 Winter Scripting Games
2006 Winter Scripting Games (part 2)
scripting games part 3
MSH Concentration (scripting games part 4)
Scripting Games week 2
The Scripting Games Event 6 in MSH
Scripting Games almost over
scripting games Last Day MSH answers for event 7 and 8

but as you see the "Hey scripting guy !" series is also nice to check fo the VbSScript examples as a lot of the techniques also can be used in powershell,
you can theck the archive here : Hey, Scripting Guy! Archive by Date
and the Script center has also a "what is new" RSS feed that you can use to be triggered when new examples get posted as they get metioned in the feed, hence its one of favorite feeds as well.

I need a bit more time on the next part of the AD series as I still don't like the version as I have it at the moment
As also I had a very busy Weekend doing a big migration at a customer last weekend, (powershell was very usefull there , not to say that it did make/save my weekend, as it enabled me to quickly do some large AD / Exchange changes and other checks of logfiles from robocopy etc .
I made some powershell scripts on the fly to :

checking list of emailadresses agains the adresses in AD etc.
scanning (grep-ping) logfiles etc.
changing Email aliases,
setting primiary aliases
removing double primairy adresses
setting forwarding on mailboxes
setting Permissions on Mailboxes.
list the mailboxes I did disable the mailbox restrictions on
setting some redirections on group mailboxes etc.

As I do think that I could have done the status reports asked, lastminute changes, and fixes needed during the migration that quick and in a situation that was, as Jeffrey Snover would say "With my hair on fire"

I did had to replace someone at the last minute on this project, hence did not know the situation wel, and the large (large) Vbscripts and tooling used for it I did not realy know , so to make these changes/fixes with the origional scripts, as mostly there was only need to do a small part of the complete migration script to run again, or needed some tuning, or I was not completly sure if all siteeffects where covered if I did run the script and also I did some things as setting send-As security on mailboxes that is not that easy,

So I was realy glad I could do a lot on the fly on the powershell commandline, and make small scripts on the fly to do the changes, to do that in VbScripts would be way to much work to even have tried.

So in this situation I realy did feel the "Power" of powershell during big migrations, As is that much more easy to make this kind of changes and checks,

I think a lot of times last weekend about how difficult that would have been in VbScript and how much time I would have taken.

and that I realy could not miss PowerShell anymore.

I will also make a post with some examples I did use for this as I clear them up and sort them out, for a later post in the AD series.


Greetings, /\/\o\/\/
Tags :

Comments: Post a Comment

Links to this post:

Create a Link

<< Home


October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   May 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006   December 2006  

$Links = ("PowerShell RC1 Docs"," PowerShell RC1 X86"," PowerShell RC1 X64"," Monad GettingStarted guide"," Monad Progamming Guide"," Monad SDK"," Monad videos on Channel 9"," MSH Community Workspace"," scripts.readify.net "," MonadSource"," www.reskit.net"," PowerShell Blog"," Under The Stairs"," computerperformance powershell Home"," proudlyserving"," MSH on wikipedia"," MSHWiki Channel 9"," Keith Hill's Blog"," Precision Computing"," PowerShell for fun"," MSH Memo (Japanese)"," monadblog")

find-blog -about "PowerShell","Monad" | out-Technorati.
find-blog -contains "","" | out-Technorati.
Web mow001.blogspot.com

This page is powered by Blogger. Isn't yours?