VMware Cloud Community
CenturaBro
Enthusiast
Enthusiast

host profile root password script update

Hey Luc,

I've been digging through your scripts for host profile configuration and came across your root password set for host profile script.

When I went to execute the script I'm getting an error:  The property 'Policy' cannot be found on this object.

its referencing to the part of the script that does so: (line 49) $spec.ApplyProfile.Security.Policy = @($secpol)

Digging through API's I do not see anything pertaining to policy under vmware.vim.hostprofileconfigspec.applyprofile.security

am I missing something here or has the script not been touched in a while and is now deprecated due to API changes.

thanks in advance!

Reply
0 Kudos
9 Replies
LucD
Leadership
Leadership

Which vSphere version are you using?

The format/layout of the HostProfile object might have changed


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

Reply
0 Kudos
CenturaBro
Enthusiast
Enthusiast

vCenter: 6.5 U1g

PowerCLI: 10.1.0 Build 8346946

Powershell: 5.1.14409.1005

Reply
0 Kudos
LucD
Leadership
Leadership

It looks as if the SecurityProfile part is not visible anymore in PowerCLI.

I'll have to some further tests.


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

Reply
0 Kudos
CenturaBro
Enthusiast
Enthusiast

Thanks a bunch for all your help in the community!

Reply
0 Kudos
WernerHellinghu
Contributor
Contributor

Hello, I'm searching also for a solution to change the password for all the host profiles by powershell.

Did you find a solution for 6.5?

Reply
0 Kudos
LucD
Leadership
Leadership

Not really.

My method from Change The Root Password In Hosts And Host Profiles doesn't seem to work anymore in recent vSphere releases.


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

Reply
0 Kudos
DavidGriswoldeB
Enthusiast
Enthusiast

We were about to head down this road and I found this thread. I am going to assume nothing has changed since 6.5 (we are mostly on 7.0)?

Reply
0 Kudos
LucD
Leadership
Leadership

There is KB68079 , but I haven't found a way yet to automate it.


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

Reply
0 Kudos
greedj1
Contributor
Contributor

Any update on this for 6.7 or 7.0?

Reply
0 Kudos