<?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 remote session - save file localy in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3943#M208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running a remote session (Enter-PSSession) and would like to save the screen output (or Out-File) locally. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While in a remote session, it would only save the file on the remote computer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Win5]: PS C:\&amp;gt; Get-NaAggr | Out-File c:\aggr.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking for a way to save the remote session locally, without actually going to the remote computer, is that possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, Start-Transcript doesn't work remotely&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2025 06:04:12 GMT</pubDate>
    <dc:creator>JSHACHER11</dc:creator>
    <dc:date>2025-06-05T06:04:12Z</dc:date>
    <item>
      <title>remote session - save file localy</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3943#M208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running a remote session (Enter-PSSession) and would like to save the screen output (or Out-File) locally. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While in a remote session, it would only save the file on the remote computer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Win5]: PS C:\&amp;gt; Get-NaAggr | Out-File c:\aggr.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking for a way to save the remote session locally, without actually going to the remote computer, is that possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, Start-Transcript doesn't work remotely&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 06:04:12 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3943#M208</guid>
      <dc:creator>JSHACHER11</dc:creator>
      <dc:date>2025-06-05T06:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: remote session - save file localy</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3948#M209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Joel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the Invoke-Command cmdlet and pass the scripts inside scriptblock and put the extracted value in a variable and perform operations on them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1367215598453443" jivemacro_uid="_1367215598453443"&gt;&lt;P&gt;PS C:\Windows\system32&amp;gt; $a = Invoke-Command -ComputerName scvmm2012sp1 -ScriptBlock { Get-WmiObject win32_computersystem }&lt;/P&gt;&lt;P&gt;PS C:\Windows\system32&amp;gt; $a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Domain&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : SaRC.com&lt;/P&gt;&lt;P&gt;Manufacturer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Microsoft Corporation&lt;/P&gt;&lt;P&gt;Model&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Virtual Machine&lt;/P&gt;&lt;P&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : SCVMM2012SP1&lt;/P&gt;&lt;P&gt;PrimaryOwnerName&amp;nbsp;&amp;nbsp;&amp;nbsp; : Windows User&lt;/P&gt;&lt;P&gt;TotalPhysicalMemory : 4294496256&lt;/P&gt;&lt;P&gt;PSComputerName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : scvmm2012sp1&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in Your Case, it should look like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1367215598436434" jivemacro_uid="_1367215598436434"&gt;&lt;P&gt;PS C:\Windows\system32&amp;gt; $a = Invoke-Command -ComputerName Win5 -ScriptBlock { Get-NaAggr }&lt;/P&gt;&lt;P&gt;PS C:\Windows\system32&amp;gt; $a | &lt;SPAN style="color: #454545; font-family: Arial, Helvetica, Verdana, sans-serif; background-color: #ffffff;"&gt;Out-File c:\aggr.txt&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 06:06:23 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3948#M209</guid>
      <dc:creator>vinith</dc:creator>
      <dc:date>2013-04-29T06:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: remote session - save file localy</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3956#M210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if I need to run this on the remote machine and save a report locally:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import-Module DataOntap&lt;/P&gt;&lt;P&gt;$filer = Read-Host "This will show volumes more than 85% full. Please enter the filer name"&lt;/P&gt;&lt;P&gt;$user = "Enter the username"&lt;/P&gt;&lt;P&gt;Connect-NaController $filer -Credential $user&lt;/P&gt;&lt;P&gt;Get-NaVol | select name,PercentageUsed,Aggregate,SnapshotPercentReserved,SpaceReserveEnabled,MirrorStatus | where { $_.PercentageUsed -gt 85 } &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 08:24:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3956#M210</guid>
      <dc:creator>JSHACHER11</dc:creator>
      <dc:date>2013-04-29T08:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: remote session - save file localy</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3961#M211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Here's a function i wrote which can be used to attain this information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here im calling the local variables in a remote powershell session using "$using" which is a new feature in PowerShell v3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1367228312838405" jivemacro_uid="_1367228312838405"&gt;&lt;P&gt;function Get-VolInfo {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$filer = Read-Host "This will show volumes more than 85% full. Please enter the filer name"&lt;/P&gt;&lt;P&gt;$user = Get-Credential&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$a = Invoke-Command -ComputerName Win5 -ScriptBlock {&lt;/P&gt;&lt;P&gt;Import-Module DataOntap&lt;/P&gt;&lt;P&gt;$new = Connect-NaController $using:filer -Credential $using:user&lt;/P&gt;&lt;P&gt;Get-NaVol | select name,PercentageUsed,Aggregate,SnapshotPercentReserved,SpaceReserveEnabled,MirrorStatus | where { $_.PercentageUsed -gt 85 }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;return $a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just copy paste the above function to your powershell window and invoke the function by calling it as below, it should give you the required information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13672283128234585" jivemacro_uid="_13672283128234585"&gt;&lt;P&gt;Get-VolInfo&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://community.netapp.com/legacyfs/online/21052_snapinfo.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 09:33:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3961#M211</guid>
      <dc:creator>vinith</dc:creator>
      <dc:date>2013-04-29T09:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: remote session - save file localy</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3970#M212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;cool&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to save this function so that every time I run Get-VolInfo it will call it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; - what does the 'return' do?&lt;/P&gt;&lt;P&gt; - can you put it in a table (not list)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 10:15:55 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3970#M212</guid>
      <dc:creator>JSHACHER11</dc:creator>
      <dc:date>2013-04-29T10:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: remote session - save file localy</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3975#M213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Joel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can copy paste the function and save it in a ps1 file, and add it to your powershell profile, so that everytime you open up powershell it autoloads the function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link &lt;A href="http://windowsitpro.com/powershell/save-your-powershell-code-profile-and-script-files" target="_blank"&gt;http://windowsitpro.com/powershell/save-your-powershell-code-profile-and-script-files&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 11:00:29 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3975#M213</guid>
      <dc:creator>vinith</dc:creator>
      <dc:date>2013-04-29T11:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: remote session - save file localy</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3982#M214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saved it as .psm1 file and then I just need to import that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import-Module c:\scripts\getvolinfo.psm1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We also had to &lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Enable-PSRemoting&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; - what does the 'return' do?&lt;/P&gt;&lt;P&gt; - can you put it in a table (not list)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 12:19:05 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3982#M214</guid>
      <dc:creator>JSHACHER11</dc:creator>
      <dc:date>2013-04-29T12:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: remote session - save file localy</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3986#M215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Change the view from Lists to Tables use ft (format-table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just put an ft * to the end and you should see the result in tabular format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: helvetica, arial; font-size: 12px; background-color: #f8f8f8;"&gt;where { $_.PercentageUsed -gt &lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: helvetica, arial; color: green; background-color: #f8f8f8;"&gt;85&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: helvetica, arial; color: #000000; background-color: #f8f8f8;"&gt; }&amp;nbsp; | ft *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also return return's the output from function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 12:33:49 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/remote-session-save-file-localy/m-p/3986#M215</guid>
      <dc:creator>vinith</dc:creator>
      <dc:date>2013-04-29T12:33:49Z</dc:date>
    </item>
  </channel>
</rss>

