A collection of PowerShell related blogs
Yahoo Pipe - PowerShell collection
PowerShell user group site
PowerShell Virtual user groups
IRC - #PowerShell on Freenode
We are finally getting around to cleaning up those guest systems still at less then hardware version 7 in our environment. Due to issues with systems losing IP Addresses and sometimes the NICs flipping to the wrong network, my co-worker wanted a list of guest systems and their IP Addresses. Here's a script I pieced together. I can't use Export-CSV because of the way the variables load up. Something I will have to learn to deal with at some point.
Script after the break...
I use/manage/access Active Directory, Exchange, Operations Manager, Office Communications Server, Configuration Manager(when they make me), VMware, etc. Lots of applications that are accessible via PowerShell. I have been using
import-module to load what I needed on an individual basis and telling people to use that method. Not a happy answer when setting things up as you always find later you missed something.
When you are new to PowerShell there is mention and piecemeal examples of what should/might go into your PowerShell profile and what is just useful to have starting out. These are generally in articles and how to's and your $profile really is something that is and should be yours to configure and customize. Some of the more fun and interesting looking stuff is way beyond the realm of the beginners to understand so leads to frustration and many just want to know what 'should' be or is 'useful' to have in there.
We are deploying more servers and services that are accessible by PowerShell, in preparation for this I have been evangelizing PowerShell at work for a few years now and have been writing install and configure documents for my team. The question of what should be in my $profile has been coming up more often. Various searches came back with snippets, parts or developer profiles that aren't really all that useful to starting script writers.
Some of this is from those snippets and half remembered readings. It should get anyone started and some of it is written to show slight differences in how things can be done.
Add-Module for example.
This $Profile.CurrentUserAllHosts will load all registered snap ins and modules on your system. Comments welcome.
So this is cool. The Commerce guys and Microsoft teamed up and got a php pdo driver to work. The Commerce guys will be maintaining the Microsoft database integration module in contrib repo. It means that it becomes accessible to a much broader audience. People will be able to use native windows backup tools to backup their site databases. Deploy on a server platform they are familiar with.
This opens up Drupal to a whole new audience that previously would not explore using Drupal at all. It will be interesting to see what things people have not previously considered that this group will bring to the community.
Microsoft announcement here
Scripting games are coming up. It's a good time to challenge yourself. See the badge on the left.
Recently we had a need to find the versions of HP iLO on all our servers. Finding out through SIM can be challenging so we could log onto each server which was unappealing. I did some searches and could only find a script for scanning based on BASH so I thought I would give it a go in PowerShell. I am sure there are ways to tighten it up but it was fun to do.
James O'Neill has an awesome post on why you should learn PowerShell now or get left behind. I have been advocating at work for a while now and his is a great post on the importance of getting on the band wagon now.
When v2 was released last week I tossed this email notification and quick links together for my co-workers.
PowerShell v2 is the native scripting and management shell for Windows 7 and Windows 2008r2. Last week, Microsoft released versions for Windows XP, Vista, Server 2003sp2 and Server 2008sp2. They have released it under the title of Windows Management Framework which is made up of;
• Windows Remote Management (WinRM) 2.0
• Windows PowerShell 2.0
• Background Intelligent Transfer Service (BITS) 4.0
Microsoft added PowerShell as part of their Common Engineering Criteria for all server based products as of 2009 so it’s something to be aware of going forward for all their products.
The announcement on the PowerShell team blog is here;
The software, and links to documentation, can be found here;
Some articles on the differences can be found on the Hey Scripting Guys website;
A very good, and free, ebook can be found online and as a pdf here;
While PowerShell v2 comes with a nice editor, there are a lot of things I still use Notepad++ for and there is a great syntax highlighting lexer that can be found here;
Have fun playing with this great tool.