This post is more than 5 years old

1 Message

138350

October 8th, 2012 17:00

Issue in OS Script with New Version 6.6.2

HI,

Below is the scritpt to get the OS information, In older Verison it "name" and "osDisplayName" then "\n". It goes to the next line.

In new version, it does not goes to next line, Any Changes has applied after the upgrade or there is another syntax for next line.

Please let me know

Thanks

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

vms = #!VMWVirtualMachine where osDisplayName like '%x%'#.getTopologyObjects()


result='name, OS name\n'

vms.each() {vm->

    result += vm.name + '   ,   ' + vm.osDisplayName + '\n'

}

return result

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

1 Attachment

59 Posts

October 12th, 2012 21:00

This is actually a minor bug in the definition of the results window of the Script Console.

Your script output contains "\n" newlines, but the renderer configured for the script output ignores them.

I believe this display bug will be fixed in the next release.

If you run the script from the command line using fglcmd, you will see the newlines in the output.

If you wish to work around the problem in the Script Console, you can use the WCF Definition editor to modify "Management Server/Commons/Result Label" to use the Renderer: "Management Server/Commons/Text Renderer: Support newlines"

Regards,

Brian Wheeldon

No Events found!

Top