I want to use GWMI to get OS and then branch accordingly. Why does the following not work?
$gOS = gwmi win32_operatingsystem
$gOS.caption.equals("Microsoft Windows 7 Enterprise")
I get false as a result. If I just do $gOS.caption it indeed does equal "Microsoft Windows 7 Enterprise". In fact I copied the output of $gOS.caption to paste into the equals statement so I KNOW it is equal.