This blog has moved to http://ThePowerShellGuy.com
Greetings /\/\o\/\/
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 guysbut after some complaining : see also :
PowerShell's Script Center problemthe 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
54217
# use the format operator :
MSH>"{0:x}" -f (0x1C8 + 0xD201)
d3c9
# use the tostring overload
MSH>(0x1C8 + 0xD201).tostring('x')
d3c9
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 8but 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 Dateand 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.
Enjoy,
Greetings, /\/\o\/\/
Tags :
Monad msh PowerShell