PowerShell for Windows Admins:

PowerShell


July 8, 2013  3:31 PM

Case sensitive operators



Posted by: Richard Siddaway
PowerShell

PowerShell is more or less case insensitive so the operation in my previous post $_.Substring(3,1) -ne "T" will trigger on “T” or “t” If you only want the uppercase version to fail then you can use the case sensitive version of –ne which is –cne. This changes the script...

July 7, 2013  2:52 PM

Measure-Object



Posted by: Richard Siddaway
PowerShell

One cmdlet that I don’t think gets used enough is Measure-Object. This enables you to find the minimum, maximum, sum and average of a set of numbers coming down the pipeline PS> 1..12 | Measure-Object -Sum -Maximum -Minimum -Average Count : 12 Average : 6.5 Sum : 78...


July 2, 2013  12:58 PM

New-mailbox oddity



Posted by: Richard Siddaway
Exchange, PowerShell

I’ve been doing a lot with Exchange recently and found an interesting quirk. If you use the New-mailbox cmdlet with the –PrimarySMTPaddress parameter the mailbox doesn’t get email address policies applied. You need to use set-mailbox to turn policy application on – after the mailbox...


June 30, 2013  1:52 PM

Using localhost



Posted by: Richard Siddaway
PowerShell

When creating functions that accept a computer name as a parameter you will often see this syntax param ( [string]$computername = ‘localhost’ ) This is designed to give a default value in the event of a value not being passed. That’s a good idea if there is a sensible, safe, value...


June 27, 2013  3:50 PM

PowerShell presentations



Posted by: Richard Siddaway
PowerShell

Jeffrey Snover and Jason Helmick will be presenting by webcast 18 July 9am – 5pm (PDT) on “Getting started with PowerShell” Details from http://powershell.org/wp/2013/06/27/a-special-presentation-on-getting-started-with-powershell/ A follow up day of presentations will occur in August...


June 27, 2013  1:58 PM

Automation tools?



Posted by: Richard Siddaway
PowerShell

In this post http://richardspowershellblog.wordpress.com/2013/06/23/opinionautomate-or-suffer/ I talked about the need for admins to learn to automate. A couple of comments brought up the need for tools to create our automation scripts. I remember the 4th generation languages of the late 1980s...


June 26, 2013  4:09 PM

Dropping a database



Posted by: Richard Siddaway
PowerShell, SQL Server

A question came up on the forum regarding dropping a database & I realised it was something I hadn’t done before. SMO provides a set of classes for managing SQL Server. You get SMO when you install the SQL Server management tools Import the module to load SMO...


June 26, 2013  1:59 PM

Windows Server 2012 R2



Posted by: Richard Siddaway
PowerShell

The Windows Server 2012 R2 preview is available on MSDN subscriber downloads. It has PowerShell v4!!!!


June 26, 2013  1:55 PM

Follow up on user group



Posted by: Richard Siddaway
PowerShell, User Group

I did a test tonight and the sound is definitely better over Lync. The sound wasn’t perfect but was much better than Live Meeting. Actually, seemed usable. The system seems a lot more responsive in terms of client screen refresh. When showing slides the client refreshes very quickly. Showing...


June 25, 2013  1:43 PM

UK PowerShell group



Posted by: Richard Siddaway
PowerShell, User Group

As you are probably aware the UK PowerShell group has been very quiet over the last few months. This has been due to my personal circumstances – hopefully now resolved. I want to re-start the group and was wondering what people wanted. When I started the group 6 years ago we were the only...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: