VMware Cloud Community
GreenC201110141
Contributor
Contributor

Unable to add VMware.VimAutomation.Core snapin - PowerCli 5.0 - PS2.0

Hi all,

I've just upgraded my PowerCli environment from 4.1 to 5.0 and since the installation, I'm not able to add the snapin in a Powershell session.

When I use this command:

     Add-PSSnapin VMware.VimAutomation.Core

I have this error:

     Add-PSSnapin : This access control list is not in canonical form and therefore cannot be modified.
     At line:1 char:13
     + Add-PSSnapin <<<<  VMware.VimAutomation.Core
         + CategoryInfo          : NotSpecified: (:) [Add-PSSnapin], InvalidOperationException
         + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.AddPSSnapinCommand

The 'VMware vSphere PowerCLI' shorcut gives me the same error Smiley Sad

I didn't find any information regarding this error with PowerCli and so before to reinstall everything, I would like to know if someone had encountered this issue before me.

Regards,

Chris.

Reply
0 Kudos
7 Replies
LucD
Leadership
Leadership

Looks like the ACLs on the snapin file are messed up.

Shortest way out, imho, would be to uninstall PowerCLI, remove the folder (C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI on W7 64-bit) and then install PowerCLI again.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
GreenC201110141
Contributor
Contributor

Hi LucD,

Thanks for your answer.

It's done, PowerCli 5.0 uninstalled, folder PowerCLi removed (I run Win XP SP3) + reboot, PowerCli reinstalled and the problem is still there.

I've changed ACLs (shortest way, Everyone Full control) on 'C:\Program Files\VMware\Infrastructure\vSphere PowerCLI', but it's not better.

Next step, try on another machine before to update my management server.

Regards,

Chris

Reply
0 Kudos
GreenC201110141
Contributor
Contributor

Hi LucD,

For your information, I had no luck with a full reinstallation of PowerCli, registries modifications or ACLs. On another station, no problems.

On my workstation, I've reinstalled PowerCli 4.1 and everything was fine. A new reinstallation of PowerCli 5.0 over 4.1 --> not better......

And so, I decided to reinstall my workstation. And now it's ok. I'll never know what has caused this issue but now I can work on my new environment 5.0, freshly installed.

Best regards, and thanks for your attention.

Chris

PS: I'm a big fan of your work, it help me everyday Smiley Wink

Reply
0 Kudos
LucD
Leadership
Leadership

Thanks.

And thanks for letting us know.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
GreenC201110141
Contributor
Contributor

Hi,

Unfortunately, I had this morning the same problem. As soon as I tried to add the vmware snapin, I received the same error message:

PS C:\Program Files\VMware\Infrastructure\vSphere PowerCLI> Add-PsSnapin VMware.VimAutomation.Core

Add-PSSnapin : This access control list is not in canonical form and therefore cannot be modified.

At line:1 char:13

+ Add-PsSnapin <<<<  VMware.VimAutomation.Core

    + CategoryInfo          : NotSpecified: (:) [Add-PSSnapin], InvalidOperationException

    + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.AddPSSnapinCommand

Arghhhhhhh.

But I have the solution now Smiley Happy . In fact, for an unknown reason, ACLs are not valid on the lock file used by PowerCLI (C:\Documents and Settings\All Users\Application Data\VMware\PowerCLI) --> Incorrectly ordered...... (see attached file) :smileyangry:

I used FileMon.exe to track changes made on the machine when the Snapin is added and we can see clearly the Buffer Overflow error when the system tried to query securities information.

As soon as ACLs are correctly ordered, everything is fine. :smileylaugh:

Best regards,

Christophe

Reply
0 Kudos
LucD
Leadership
Leadership

Good find, that looks like it might be a bug.

I assume that this is on a XP client ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
GreenC201110141
Contributor
Contributor

Yes, correct. WinXP SP3.

I never had this issue on 2003 or 2008 servers.

Christophe

Reply
0 Kudos