Team
is there any chance to get the info you can see below using some powercli script or command...this info came from run a local os command on vcenter/vrops wich is a Liux OS Photon
Thx in advance to everyone!!!!!!!!
root@b02peivis001labvc [ /etc/pam.d ]# chage -l root
Last password change : Mar 09, 2020
Password expires : Jun 07, 2020
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 90
Number of days of warning before password expires : 7
If you have the VMware Tools running, you can use Invoke-VMScript.
$pswd = 'VMware1!'
$cred = New-Object -TypeName PSCredential -ArgumentList $user,(ConvertTo-SecureString -String $pswd -AsPlainText -Force)
$sInvoke = @{
VM = 'photonps'
ScriptText = 'chage -l root'
ScriptType = 'bash'
GuestCredential = $cred
}
Invoke-VMScript @sInvoke | Select -ExpandProperty ScriptOutput
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD
i`m trying to run this on a Vcenter Server appliances and/or a Vrops appliance also....as far as i know can not install vmtools there...
also what i need to configure there is the password lenght
i.e. i used this command for ESXi
Get-VMHost | Get-AdvancedSetting -Name Security.PasswordQualityControl | Set-AdvancedSetting -Value "similar=deny retry=3 min=disabled,disabled,disabled,disabled,15" |
not know what can i use to do this on VC nor VRops...
thx in advance!!!
The only other way you could this is through the OVF properties.
But for the appliance you mention, these settings are not exposed through the OVF properties.
Btw, on the VCSA appliance, the VMware Tools are builtin, they should be running.
Same for the vROPS Manager appliance afaik.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference