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

  1. Retrieve the current local accounts global password policy.
    Invoke-GetLocalAccountsGlobalPolicy
    
  2. Prepare the data structures for the operation.
    $LocalAccountsPolicyInfo = Initialize-LocalAccountsPolicyInfo -MaxDays 352 -MinDays 1 -WarnDays 7
    
  3. Invoke the API operation.
    Invoke-SetLocalAccountsGlobalPolicy -LocalAccountsPolicyInfo $LocalAccountsPolicyInfo
    
  4. (Optional) Retrieve the new local accounts global password policy.
    Invoke-GetLocalAccountsGlobalPolicy