Apparently I am still not in programmer mode because I could not figure out how to do something simple.
I am writing a little powershell (that I can share once it is complete) to bring the 2008 R2 servers up to speed to manage with server manager from Windows 8
So, here are my 2 problems (and they are easy)
to check Powershell version I do $PSVersionTable.PSVersion which reports 3.0
I guess I can save it to a variable and convert it to integrer (I did that before, I just need to check what I did in the code)
That is easy, the problem is when I check the WinRM version
When you run WinRM id it reports something like
IdentifyResponse ProtocolVersion = http:// ProductVendor = Microsoft Corporation ProductVersion = OS: 6.2.9200 SP: 0.0 Stack: 3.0schemas.dmtf.org/ wbem/ wsman/ 1/ wsman.xsd
So I need to get the part that says Stack: 3.0 because that is the version. How can I just select that for a variable so I can do some check afterwards?
Right now my script is mainly informational. It basically list the steps needed and gives you some environmental information to work from (and it already helped me prepare servers more clean), but I want to automate a little just so I can get more PowerShell experience (It has been at least 6 months since the last script)