diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)


Debugging PowerShell Cmdlets and providers with Visual Studio and CTP2

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)

Full Article

Share This Story, Choose Your Platform!

Do NOT follow this link or you will be banned from the site!