Auto reconnect to a server you just rebooted with PowerShell 3.0

Sunday, January 8, 2012

Yesterday I saw a tweet that caught my eye: Sounds familiar? What do you usually do to reconnect to your server once it is back online? How do you monitor it’s availability? In this post, Justin shares a great function (115 lines) that restarts a server, waits for it to come back online and then starts a remote desktop connection to it. Now, what if I told you that in PowerShell 3.0 you can replace that function with only two lines of code? In PowerShell 3.0, the Restart-Computer cmdlet got improved (mainly to support Workflow scenarios) and it now supports...

PSRR – Remote Registry PowerShell 3.0 Module

Wednesday, November 2, 2011

var addthis_config = {"data_track_clickback":true}; One of the new improvements in the .NET Framework version 4 is the Microsoft.Win32.RegistryView enumeration. On the 64-bit version of Windows, portions of the registry are stored separately for 32-bit and 64-bit applications. There is a 32-bit view for 32-bit applications and a 64-bit view for 64-bit applications. Many of the 32-bit keys have the same names as their 64-bit counterparts, and vice versa. In the 64-bit version of Registry Editor, 32-bit keys are displayed under the following registry key: HKEY_LOCAL_MACHINE\Software\WOW6432Node. I’m pleased to announce that the PSRemoteRegistry module has...

The PowerShell Experts Video Series

Thursday, October 27, 2011

var addthis_config = {"data_track_clickback":true}; PowerShell Magazine has started the PowerShell Experts Video Series, a series of short video interviews conducted at the PowerShell Deep Dive conference in Frankfurt, Germany. Starting today, we will post one video interview per day.  The first one is with MVP Dmitry Sotnikov.

New advanced functions language features in PowerShell v3

Monday, October 24, 2011

var addthis_config = {"data_track_clickback":true}; PowerShell 3.0 CTP1 includes many new language enhancements. Here are four of them for advanced functions.   CmdletBinding and Parameter attributes We are no longer required to assign a value of $true to CmdletBinding and Parameter attributes. For example, in v2 we had to write:   param( [Parameter(Position=0, ...
no comments

Windows PowerShell 3.0 CTP1 is available for download!

Tuesday, September 20, 2011

var addthis_config = {"data_track_clickback":true}; Windows Management Framework 3.0 Community Technology Preview (CTP1) is available for download for Windows 7 SP1 and Windows Server 2008 R2 SP1. Read the full announcement on the PowerShell team blog. Check out this post on the PowerShell Magazine site for a quick review of new cmdlets and parameters in v3. var addthis_config = {"data_track_clickback":true};
one comment

How to disable positional parameter binding in PowerShell vNext

Monday, September 19, 2011

var addthis_config = {"data_track_clickback":true}; Windows PowerShell supports two kind of parameters: Named and Positional. In a nutshell, Named parameters must be specified on the command line while Positional parameters are inferred by the argument’s position on the command line. The type of the parameter is controlled by the attribute (see about_Parameters). What if we wanted to disable positional parameters and force users to write the parameter name and its value? Consider the following example, all parameters values are positional. Can you guess the parameter names? PS> Register-ObjectEvent $timer Elapsed Timer.Random...

Get Your Game On! Leverage Proxy Functions In Windows PowerShell

Thursday, September 1, 2011

var addthis_config = {"data_track_clickback":true}; I’m excited to announce that MVP Kirk Munro (aka poshoholic) and I are going to present in the upcoming PowerShell Deep Dive track at the The Experts Conference in Frankfurt, Germany (17-19 October 2011).   In this session we will take a deep dive into proxy functions in PowerShell. We have been working together on PowerShell Proxy Extensions, a powerful module that leverages proxy functions and makes it easier than ever to create these powerful extensions to PowerShell. We will demonstrate what proxy functions are and why they are important, and then show how...
no comments

Get Full Control over your Exchange remote PowerShell session

Monday, August 22, 2011

var addthis_config = {"data_track_clickback":true}; PowerShell 2.0 supports two kinds of remote configurations: fan-in and fan-out. When we execute a command against a bunch of servers we use fan-out (one to many). Fan-in is used when multiple users are connecting to a remote server (many to one). Exchange server implements a fan-in configuration via a virtual directory on the Exchange server’s IIS. We can connect to the virtual directory (http connection) and manage our Exchange server remotely, without having to install the Exchange Management Tools locally on our admin station. We can create a remote session (using the currently logged...
12 comments

Exchange – Removing Illegal Alias Characters using PowerShell

Monday, August 15, 2011

var addthis_config = {"data_track_clickback":true}; If you're in a mixed-mode environment with both Exchange 2003 and Exchange 2007/2010 you may have noticed this message when using the Get-* cmdlets in the Exchange Management Shell: WARNING: The object domin.com/Users/UserName has been corrupted, and it's in an inconsistent state. The following validation errors happened: WARNING: Property expression "xx xxx" isn't valid. Valid values are: Strings formed with characters from A to Z (uppercase or lowercase), digits from 0 to 9, !, #, $, %, &, ', *, +, -, /, =, ?, ^, _, `, {, |, } or ~. One...