August 12, 2008
12:58 am
In PowerShell CTP2, you have a nice cmdlet, Add-Module, that frees you from the constraints of having to declare a snapin. By using Add-Module, you can take any old library of code and load it to find cmdlets or providers. This means that debugging your cmdlets and providers in Visual Studio is a real snap.
To debug a cmdlet or provider using Windows Powershell CTP2, right click the project file containing your cmdlet, then click properties, then Debug. Change it to Start External Program and put either C:\Windows\System32\WindowsPowerShell\v1.0\gpowershell.exe (Graphical PowerShell) or C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe (Console PowerShell)

TrackBack URI Leave a comment »