I have just come across a great resource on Microsoft’s TechNet site. They have a page which lists the PowerShell v2.0 cmdlets provided within their products such as Active Directory, Exchange, SQL Server, Windows Server and more. I would highly recommend viewing the page “Windows PowerShell Features from Microsoft“.
Sometimes weeks go by without me finding anything particular to write about… Then, like last night, several small links turn up which I just can’t resist.
First of all, Don Jones has put up a new site to provide listings of Powershell resources called Shellhub.com. I highly recommend you go and have a look and help out by contacting him with further resource information.
Then I found out about the Windows PowerShell Owner’s Manual on TechNet. I’m pretty sure it’s been around for a while but I hadn’t noticed it before. It’s definitely worth having a read of this if you’re starting out.
Finally, Jason Archer has released the first version of his Isolated Storage provider module on CodePlex so that you can access isolated storage as if it is a drive. It requires you to install Oisin’s PSScriptProvider module. If you have a requirement to access isolated storage this is most certainly worth a look.
I’ve been working on a small project to analyze report emails I receive under another Exchange account, and hit an issue that has been mentioned all over the internet where calling the GetSharedDefaultFolder MAPI function fails to work in PowerShell. The real issue lies with the fact that the interop version of the Recipient object is automatically unboxed by PowerShell to it’s base COM class. Unfortunately the interop version of GetSharedDefaultFolder can’t box it back up, and neither can PowerShell, so it all fails miserably.
I’ve read quite a few posts on the subject, mostly based on PowerShell v1.0 which have had horribly complex workarounds where you have to build C# modules and then call those from PowerShell… However, in v2.0 we can use the Add-Type command to provide the same effect and with much less work. Read the rest of this entry »
Just a quick note to let you all know that I am now a moderator on the Official Scripting Guys Forum, in the illustrious company of people like Brandon Shell, Shay Levy and Ed Wilson…
Why not come along and have a chat with your peers about PowerShell!
The Visual Studio Blog reports on a great new feature in MSBuild 4, as used by Visual Studio 2010: you can now define custom tasks in an MSBuild XML script using PowerShell! This brings all the power of PowerShell and the .Net framework in to play inside the MSbuild system…
The trick is to link in a Windows PowerShell Task factory which doesn’t come with the system. No need to worry about how to write this as a DLL though, as the full source for this is available as an MSDN sample.
The popular Hey, Scripting Guy! site has announced that their blog will now be updated 7 days a week, starting on Saturday 7th February. Go see Ed Wilson and the guys and learn more about PowerShell and other scripting languages!
Hi all,
First of all – apologies for the long absence and happy belated holiday greetings to all.
So, before the holiday break I was working with SQL data cubes in OLAP systems. Traditionally I have always accessed these either through using a SQL GUI which understood MDX (the SQL like querying language) or by using Excel’s built in support for slicing through the data. This is great, until you need to get the data natively in an automation script. I know it’s easy to get Excel data into PowerShell, but I was sure it would be easier to access the data directly… Read on for the solution and code sample. Read the rest of this entry »
I was working on a small piece of code the other day to generate file paths, and I was trying to create a folder name of the form “Part1_Part2″ where the parts come from variables. So my first – and as it turns out incorrect – assumptions was to do the following:
$part1 = "Part1" $part2 = "Part2" $folderName = "$part1_$part2"
You would think that $folderName contains “Part1_Part2″ at this point. But no, it actually contained “Part2″, having completely lost the first variable as well as the underscore!
Some further trial and error finally produced the solution. It appears that PowerShell is assuming that it is looking for a variable called “$part1_”, rather than “$part1″. The solution was to explicitly tell PowerShell to assess “$part1″:
$folderName = "$($part1)_$part2"
And now we get what we expected! Hope this small tip helps you all…
Hi all – sorry for the hiatus. I’ve been away for a couple of weeks on several trips, both for business and pleasure. Anyway – now that I’m back in the throws of normality – normal service should be resumed.
To kick things off again, I would like to draw your attention to a lovely little Sidebar Gadget developed by Andrew Peters from Mindscape. Read the rest of this entry »
Netbooks are becoming more and more prevalent in the world today. They are a great tool but they do have one drawback – no CD/DVD drive. As they regularly come with XP or Vista you have to beg, buy or borrow an external optical drive if you want to install Windows 7. Or do you?
On the Windows Weekly podcast, Paul Thurrott (of the SuperSite for Windows fame) mentioned his software pick of the week – WinToFlash. This is a simple wizard tool which allows you to create an installable version of your Windows operating system from your optical install media on a USB memory stick.
WinToFlash is still in beta but I had a chance to try it this weekend – I put my Windows 7 DVD in my main PC, ran up the tool and a simple wizard allowed me to create an installable version of the operating system on my memory stick. It only took about 10 minutes to set it up, and then I booted my netbook with the USB dongle plugged in and I was installing. Not only does this remove the issue with the lack of a DVD drive, but the install actually ran quicker as well…
It is documented as working with any Windows operating system, as long as you own the original installation disc. Do have a look if you own a netbook – it may save you a lot of time and hassle!