Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Import-PSSession and temp files in a concurrent environment

$
0
0

Hi everyone,

I am doing Remote PowerShell in a programmatic way, such as explained here: http://blogs.technet.com/b/exchange/archive/2009/11/02/3408653.aspx ; last section "Remote Request using a local run space (Scripting the remote class)"

However in order to release memory and temp files, I need to Remove the PSSession after all the calls, and this removes the temp files created at the "Import-PSSession", as well as releasing memory. Everything fine until here...

Now try to execute this in a main thread, and start two concurrent threads for examples doing the same thing. Almost everytime this will prevent Powershell from properly removing the temp files.

Is this a Powershell issue that can't be resolved ?

Environment:

  • Windows 7 Enterprise, Windows Server 2008 R2
  • Remote PowerShell on SharePoint or Exchange (does not change the issue)
  • Powershell V2

Please let me know if you require any further information. Thank you for your help. 

Olivier.


Viewing all articles
Browse latest Browse all 2562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>