Both PowerCLI 4.0U1 and Microsoft System Operations Manager 2007 Powershell snapins have a command with the same name, get-task. Is it possible to get a workaround so we can use the features from both snapins?
Any chance the PowerCLI command could be changed to something like Get-VITask? Thank You.
As a workaround you can do
VMware.VimAutomation.Core\Get-Task
or
$PCLI = "VMware.VimAutomation.Core" .... & "$PCLI\Get-Task"
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
As a workaround you can do
VMware.VimAutomation.Core\Get-Task
or
$PCLI = "VMware.VimAutomation.Core" .... & "$PCLI\Get-Task"
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
For this problem have a look at Richard's post Cmdlet name clashes.
And perhaps vote for the enhancement request Dimitri has raised.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi there,
You can also use alias:
PS> New-Alias Get-VITask VMware.VimAutomation.Core\Get-Task
PS> Get-VITask
Vitali
PowerCLI team
An alias would indeed be another solution, but I have to agree with what Richard said about aliases.
"It would be possible to create separate aliases for the clashing cmdlets but the issue with that is portability and remembering to use the alias especially if its something that is used infrequently."
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference