2,187
edits
m (→Gotchas: Rewording of "VMware PowerCLI 64 bit") |
|||
Line 105: | Line 105: | ||
** The background job script runs in a new context, therefore it runs in the default path. If you tend to run your scripts from a non-default path, and need to read/write files, get the current directory using <code>Get-Location</code> and pass it to your job as a parameter, then use <code>Set-Location</code> in your job. | ** The background job script runs in a new context, therefore it runs in the default path. If you tend to run your scripts from a non-default path, and need to read/write files, get the current directory using <code>Get-Location</code> and pass it to your job as a parameter, then use <code>Set-Location</code> in your job. | ||
* '''VMware PowerCLI 64 bit''' | * '''VMware PowerCLI 64 bit''' | ||
** Due to a bug you can't launch background jobs | ** Due to a bug you can't launch [[:Category:PowerCLI|VMware PowerCLI]] background jobs when running in a 64-bit environment. Doing so cause launched PowerShell instances to exhibit high CPU and memory usage and eventually PowerShell will crash. Whether its a problem in PowerShell or in PowerCLI is unclear (though I suspect PowerShell), the problem definitely effects PowerCLI v4.1u1 and v5, and probably affects all versions. | ||
** Therefore launch from 32-bit PowerCLI shell. To run scripts in 32-bit see [[Getting_Started_(PowerCLI)#Force_32-bit|Force 32-Bit]], to detect in a script see [[Getting_Started_(PowerShell)#Useful_One-Liners|Useful One-Liners]]. | |||
[[Category:PowerShell]] | [[Category:PowerShell]] |