<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to get the VM Name in the output in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Unable-to-get-the-VM-Name-in-the-output/m-p/2920856#M107555</link>
    <description>&lt;P&gt;Shouldn't that line be&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;Write-Output "VMInfo by on $($date) for Linux Server : $($result.Output) `r`n" &amp;gt;&amp;gt; "D:\Date\output1.txt"&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 16:56:11 GMT</pubDate>
    <dc:creator>LucD</dc:creator>
    <dc:date>2022-07-27T16:56:11Z</dc:date>
    <item>
      <title>Unable to get the VM Name in the output</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Unable-to-get-the-VM-Name-in-the-output/m-p/2920835#M107550</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am unable to get the VM name from the invoke-sshcommand of a remote VM. Please help!!&lt;/P&gt;&lt;P&gt;$WPassword = "password123"&lt;BR /&gt;$pass = ConvertTo-SecureString -AsPlainText $WPassword -Force&lt;BR /&gt;$Creds = New-Object System.Management.Automation.PSCredential ("localhost\admin", $pass)&lt;BR /&gt;Invoke-Command -ComputerName WINJUMP01 -ScriptBlock {&lt;BR /&gt;$pass = ConvertTo-SecureString -AsPlainText "mypassword" -Force&lt;BR /&gt;$Cred = New-Object System.Management.Automation.PSCredential ("root", $pass)&lt;/P&gt;&lt;P&gt;$script = @"&lt;BR /&gt;echo "Checking VM Info of :: $(hostname)"&lt;BR /&gt;"@&lt;/P&gt;&lt;P&gt;$session = New-SSHSession -ComputerName "mylinuxvm" -Credential $Cred -AcceptKey&lt;BR /&gt;$result = Invoke-SSHCommand -SSHSession $session -Command $script -Verbose&lt;BR /&gt;Write-Output "VMInfo by on $($date) for Linux Server : $(hostname) `r`n" &amp;gt;&amp;gt; "D:\Date\output1.txt"&lt;BR /&gt;$result.output&lt;BR /&gt;Remove-SSHSession -SSHSession $session | Out-Null&lt;BR /&gt;} -credential $Creds&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 15:56:00 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Unable-to-get-the-VM-Name-in-the-output/m-p/2920835#M107550</guid>
      <dc:creator>ganapa2000</dc:creator>
      <dc:date>2022-07-27T15:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the VM Name in the output</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Unable-to-get-the-VM-Name-in-the-output/m-p/2920844#M107551</link>
      <description>&lt;P&gt;Where do you expect the name of the VM to be shown?&lt;BR /&gt;On screen?&lt;BR /&gt;In that file?&lt;BR /&gt;&lt;BR /&gt;Not sure what exactly you are doing, you are running a script block on a Windows box from where you do an SSH to a Linux box.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 16:15:31 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Unable-to-get-the-VM-Name-in-the-output/m-p/2920844#M107551</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2022-07-27T16:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the VM Name in the output</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Unable-to-get-the-VM-Name-in-the-output/m-p/2920854#M107553</link>
      <description>&lt;P&gt;Hi LucD,&lt;BR /&gt;I need to run from remote jump server to a Linux VM. I would like to get the output on screen and also get captured in text file.&lt;/P&gt;&lt;P&gt;In the output and in the text file, I am getting the hostname of windows jump server but I would like to get the Linux VM name&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 16:49:14 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Unable-to-get-the-VM-Name-in-the-output/m-p/2920854#M107553</guid>
      <dc:creator>ganapa2000</dc:creator>
      <dc:date>2022-07-27T16:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the VM Name in the output</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Unable-to-get-the-VM-Name-in-the-output/m-p/2920856#M107555</link>
      <description>&lt;P&gt;Shouldn't that line be&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;Write-Output "VMInfo by on $($date) for Linux Server : $($result.Output) `r`n" &amp;gt;&amp;gt; "D:\Date\output1.txt"&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 16:56:11 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Unable-to-get-the-VM-Name-in-the-output/m-p/2920856#M107555</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2022-07-27T16:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get the VM Name in the output</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Unable-to-get-the-VM-Name-in-the-output/m-p/2920858#M107556</link>
      <description>&lt;P&gt;Thank you very much LucD. that worked &lt;img class="lia-deferred-image lia-image-emoji" src="https://communities.vmware.com/html/@3CBC42A1E7848F607FD419D398107BF9/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 17:42:39 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Unable-to-get-the-VM-Name-in-the-output/m-p/2920858#M107556</guid>
      <dc:creator>ganapa2000</dc:creator>
      <dc:date>2022-07-27T17:42:39Z</dc:date>
    </item>
  </channel>
</rss>

