for the most part dos commands in ISE can be captured in a variable and then parsed. I have an issue with one command the simply opens a command sell runs the command closes the command shell then nothing is in the variable.
$info = nltest /server:$server /dsgetsite
however is I run this command in a powershell console it does as expected. Is there some trick im missing here? I love using ISE I don't want to have to use the console if at all possible.
I can't vouch for what is going on for your machine. I am running WMF 5.0 and have no issues with the code below. Can you try it on another machine? I've run the script from the console and the ISE without issue.