icomasoft
PowerScripter 1.5 |
As we strive to integrate and not to seperate, we
included the PowerGUI support. If you haven't done so yet, please install
PowerGUI now: http://www.powergui.org The simplest way to edit or debug a script with
PowerGUI is to select the relevant script in the PowerScripter Edit
script context menu: Alternatively, hold the
shift key while clicking on the context menu
object. If PowerGUI is correctly installed, the script will
open with the free editor. Otherwise nothing happens. If you use the debug function of
PowerScripter, the script will be slighty changed by
adding PowerScripter - PowerGUI debugger regions.
Therefore, you can directly edit your script and do a debug run without having
to logon to the VMware server or to select an object. Original script to disconnect any network
adapter: #--name
Connect VM Network


#--hideoutput
$_ | Get-NetworkAdapter
PowerScripter debug mode script:
#region PowerScripter - PowerGUI
debugger
#do not edit manually
Get-VM "virtualmachine" | % {
#endregion
#--name Connect VM
Network
#--hideoutput
$_ | Get-NetworkAdapter |
Set-NetworkAdapter -connected:$true -Confirm:$false
#region PowerScripter - PowerGUI
debugger
#do not edit manually
}
#endregion
Important: PowerScripter removes the region automatically when the script runs for the first time outside of PowerGUI again! You do not need to care about these regions at all.
Steps to debug a script:
Exception: It's not possible to edit or debug scripts from a PowerPack file content