You can update the local accounts global password policy in vCenter
Server by using the vSphere Automation SDK for PowerShell.
Prerequisites
Verify that you are connected to a vSphere Automation API server.
Procedure
-
Retrieve
the current local accounts global password policy.
Invoke-GetLocalAccountsGlobalPolicy
-
Prepare the data structures for the operation.
$LocalAccountsPolicyInfo = Initialize-LocalAccountsPolicyInfo -MaxDays 352 -MinDays 1 -WarnDays 7
-
Invoke the API operation.
Invoke-SetLocalAccountsGlobalPolicy -LocalAccountsPolicyInfo $LocalAccountsPolicyInfo
- (Optional)
Retrieve the new local accounts
global password policy.
Invoke-GetLocalAccountsGlobalPolicy