Archive for May, 2010


Will be presenting a talk this year at the Silicon Valley Code Camp 2010.  The session will be on Powershell Version 2 Modules and how to build and work with them.  Come and learn the new way to automate and manage just about anything using Microsofts new shell.
 
 

CodeCamp at FootHill College.  Click Here for Details and Registration

 
qawarrior, a co-worker of mine, is also presenting a session on Advanced Scripting for Powershell.  See it here.  http://nullreferenceproject.blogspot.com/2010/05/5th-silicon-valley-code-camp-oct-9th.html
 
 
-Shane
Advertisements
Just played with this a bit.  Works like the normal functions in Powershell V1 but thought I would give an example in V2 advanced functions.
 

function Test {

 [CmdletBinding()]
 param(
 [Parameter(Mandatory=$true)]
 [ref]$var
 )
 #Note the $var.value.  $var = 5 will not work.
 $var.value = 5

}

PS C:\Users\spowser> $var = 1
PS C:\Users\spowser> Test -var ([ref]$var)
PS C:\Users\spowser> $var
5

-Shane