header image

Archive for April, 2014

I co-edited PowerShell Deep Dives – http://www.manning.com/hicks/ – alongside Jeff Hicks and other PowerShell MVPs.  The book is collection of chapters from  PowerShell experts from around the world. The list of authors includes: Jeffery Hicks, Richard Siddaway, Oisín Grehan, Aleksandar Nikolić, Chris Bellée, Bartek Bielawski, Robert C. Cain, Jim Christopher, Adam Driscoll, Josh Gavant, Jason […]

under: Books, PowerShell original

Requires statement

Posted by: | April 10, 2014 | No Comment |

A comment was left on my last post stating that the requires keyword could be used to test for modules. Requires is a keyword that can be put at the top of scripts and modules. It will prevent the script or module running if the requirement isn’t met.  You can test for a number of […]

under: PowerShell Basics, PowerShell v4

I had a comment left on an old post stating that Get-ADuser errored stating it wasn’t a cmdlet.  This is because the module wasn’t loaded or on PowerShell 3 and above available to be auto-imported.  That got me thinking about testing for a modules existence. function test-module { [CmdletBinding()] param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$name, [Parameter(ParameterSetName=’Installed’)] […]

under: Modules, PowerShell V3, PowerShell v4

Way back in the day – http://richardspowershellblog.wordpress.com/2007/12/20/list-mailboxes-by-mailbox-database/ – I showed how to list mailboxes by the database in which they were stored.  I had a comment left asking if its possible to list only a specific mailbox and to give the mailbox size as well. To recap: Get-Mailbox will return the list of mailboxes This […]

under: Exchange, PowerShellV2

Finding the class key

Posted by: | April 7, 2014 | No Comment |

Time to extend our module for investigating CIM.  This time I want to show you how to find the key to the class. You need to know the key property of a CIM class when you perform a number of actions – most particularly when you create an instance of the class. Its just a […]

under: PowerShell and CIM, PowerShell and WMI, PowerShell V3, PowerShell v4

I recently showed how to use Get-CimInstance to discover the namespaces present in a particular CIM namespace.  I’m going to try to use CIM instaed of WMI but expect the old terminology to creep in occasionally. The function I showed last time will only find the first level of namespaces in a namespace – what […]

under: PowerShell and CIM, PowerShell and WMI, PowerShell V3, PowerShell v4

The Windows Server 2012 R2 Update (and the corresponding Windows 8.1 Update) are available to MSDN/TechNet subscribers. General availability follows on 8 April (patch Tuesday) Details from http://blogs.technet.com/b/windowsserver/archive/2014/04/02/windows-server-2012-r2-update-is-now-available-to-subscribers.aspx

under: Windows 2012 R2

The Windows Server blog has an announcement, and download link, for WMF v5.  http://blogs.technet.com/b/windowsserver/archive/2014/04/03/windows-management-framework-v5-preview.aspx The headline items are OneGet and cmdlets for managing network switches that conform to the Certified for Windows Network program. OneGet is a way to discover, and install, software packages. In this release you can search for and install software from […]

under: Windows 2012 R2, Windows Server 2012 R2

The latest instalment from the WMI team on using PowerShell and the CIM cmdlets is available – http://blogs.msdn.com/b/wmi/archive/2014/03/28/performing-management-tasks-using-cim-cmdlets-4-files-and-folders.aspx This time round the examples are to do with working with the file system – files, folders and shares. If you’ve worked with WMI you’ll be aware of that very often you get 2 classes one with […]

under: File System, PowerShell and CIM, PowerShell and WMI, PowerShell V3, PowerShell v4

MVP award renewed

Posted by: | April 1, 2014 | 1 Comment |

Received an email this afternoon renewing my PowerShell MVP award for another year.  This is a great honour and I’d like to thank you for helping to make this possible by reading my blog posts.

under: PowerShell original

« Newer Posts

Categories