Closed vaibhavgulhane closed 3 days ago
@vaibhavgulhane you use this in SCOM or Azure product? I don't see this scenario for supported products.
can you try omicl ** > /tmp/yourresult.txt
and then read the content from /tmp/yourresult.txt? from you description it seems be related to encoding of bash command.
@JumpingYang001 I am using this on Hyper-V. Redirecting to a file shows same behavior. Hexdump shows that characters are different every time.
Below screenshots shows that string 32_Compu in Win32_ComputerSystem is changed with random characters. Changed characters are different in first and second screenshot:
Using stdbuf -o0 cmd > file
resolves the issue.
glad to know you have work around, in fact, we don't have supported products that use that Linux omicli to query Windows now. :)
I am running command on Linux to get Win32_ComputerSystemProduct from Windows. Expected Output:![image](https://github.com/microsoft/omi/assets/53223274/b9fea93b-1001-4134-b5f4-aeb3fbd6e56e)
If I store the output in a variable or any file, then some characters of xml data is changed. These characters are changed randomly.![image](https://github.com/microsoft/omi/assets/53223274/63ec6380-dc5d-47b8-8ef7-f0a5853a77ed)
This issue is reproducing on
Same command works on CentOS 7.
locale is set to en_US.UTF-8 on all OS.
Please help me in resolving this issue.