Unable to print output of the powershell command which is declared in ruby method

Unable to print output of the powershell command which is declared in ruby method.
I have a command which is declared using variable, then trying to return output by “stdout” using Mixlib::ShellOut.

Can you please help with this to get the feasible answer.

What is it that you have tried? Snippeting the code will help us better craft an answer.

Below is the code i used to get the output,

cmd_string = "get-date -format “M/d/yyyy hh:mm:ss tt”"
cmd = Mixlib::ShellOut.new(cmd_string)
return cmd.run_command.stdout