powergui

Can't start debugger in PowerGUI

I am using the PowerGUI Script Editor 1.7.1.702, and trying to start debugger, but I get such error message: Cannot find a provider with name 'Remove-PSBreakPoint -BreakPoint $bE4078E3092DF4dd9A469F3DC0CBB505C;Remove-Variable vE4078E3092DF4dd9A469F3DC0CBB505C;Remove-Variable bE4078E3092DF4dd9A469F3DC0CBB505C; This happens o...

Debug PowerShell using PowerGUI

I use PowerGUI to edit my script. In Visual Studio, I can add command line argument from project properties. However, I cannot find a way to set parameters to the UI to debug my codes with specified $args. For example, I set one debug point in PowerGUI, first line of my start code. Then I try to start my script from UI's panel "PowerShe...

I cannot debug in PowerGui

I have PS V2 and PowerGUI (1.9.6.1027). I set a debug point in my script in PowerGUI, but I cannot get debug workin when I start debug from tool bar or menu item. I got a dialog of "Continue with this operation?" as caption. There are 4 options "Yes", "Yes to All", "NO" and "No to All". Not sure if there is any thing or option I have to...

Can't get powershell script to run inside PowerGUI

When I run my script directly from the Powershell console it works. When I run my script in PowerGUI and try instantiate an object, I get an error: Exception calling ".ctor" with "3" argument(s): "Could not load file or assembly 'MyLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=77f676cc8f85d94e' or one of its dependencies. The s...

Error when calling 3rd party executable from Powershell when using an IDE

I have a PowerShell script that uses du.exe (Disk Usage originally from Sysinternals) to calculate the size of directories. If I run du c:\Backup in the console, it works as expected, but the same line of code run in ISE or PowerGui gives the expected result plus the error + du <<<< c:\backup + CategoryInfo : NotSpecified:...

$MyInvocation.MyCommand.Path is $null in PowerGUI script editor

When trying to debug my powershell script in the powerGUI script editor (2.0.0.1082) the $MyInvocation.MyCommand.Path is $null. It works when running the script via powershell. Running it in Powershell_ise.exe (on one of our servers) also works fine. Have anyone else had the same problem or know what's wrong? Here's my powershell ve...

How do I run PowerShell scripts in debug mode in PowerGUI under .NET 4 Framework?

I've read the whole thread about running PowerShell under .NET 4.0, including the warnings about what happens when using the registry keys to make the scripts run under that framework. So far, I only get the desired result with the registry keys. Is anyone aware of a way to make this work without changing the registry keys? When I c...

Error when running powershell script to import users from csv using Import-Csv and New-QADUser into Active Directory

My script looks like this: $Users = Import-Csv "C:\users.csv" foreach ($User in $Users) { New-QADUser -Name $User.Name ` -ParentContainer $User.OU ` -FirstName $User.FirstName ` -LastName $User.LastName ` -UserPassword $User.userPassword ` -SamAccountName $User.sAMAccountName ` } When I run ...