Having a need to see why a Powershell code is not coming to the end I wanted.
Usually I will tinker with it by adding a bunch of Write-Host code, but today wanted to be a little lazy and also I can be more trusting as it is code I have already done enough with it already.
That is where Windows PowerShell Integrated Scripting Environment ( ISE ) comes in.
If you are unable to run “Powershell ISE” through the start menu, please enable it.
Note, you need to be running at least MS Windows 7 or MS Windows 2008.
Import-Module ServerManager Add-WindowsFeature PowerShell-ISE
Using Server Explorer
- Open the Server Explorer
- Navigate to the Features Node
- Right-click on Features node, select “Add Features”
- You will get Add Features wizard with list of features provided with checkboxes.
- Check the “Windows PowerShell Integrated Scripting Environment (ISE)”
- Click on Next button
- Click on Install button.
Start Powershell ISE
Load Powershell File
Review code and on each line that you want to break on, please press F9 or right click and select break-point from the drop-down menu.
Via Command Window, enter variable name and press enter command
Via Command Window, set variable