WARNING This script is obsolete

Had this warning appear this morning when starting Powershell.

WARNING: This script is obsolete. Use Initialize-PowerCLIEnvironment.ps1 instead

My first thought was that I haven’t changed anything, in my profile at least. Since I have put in my powershell profile transcript logging for all Powershell sessions, I decided to search for the error and found it had happened a number of time before. I realised that I have installed PCLI4.1 Update 1, which lead me to check the shortcut I use from the Quick Launch and compare it to the one in the start menu.

Previous version
C:\WINDOWS\SYSTEM32\WindowsPowerShell\v1.0\powershell.exe -psc "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" -noe -c ". \"C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-VIToolkitEnvironment.ps1\""

PowerCLI 4.1 Update 1
C:\WINDOWS\SYSTEM32\WindowsPowerShell\v1.0\powershell.exe -psc "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" -noe -c ". \"C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1\""

So simply update my shortcut and warning goes away.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.