error handling and layout cleanup

Added "-ErrorAction Stop" to Invoke-WMIMethod Cmdlet so that Try/Catch block will execute properly

Also cleaned up longer lines and broke them into multi-line statements for readability