Thursday, February 28, 2019

Change vCenter Appliance 6.x root account password Policy

After login to Shell on vCenter Appliance use command

chage -M -1 root

to list the password policy use command

chage -l

Reboot vCenter Done.

PowerCLI Modules in PowerShell ISE


Open PowerShell ISE




STEP 1
$Profile

C:\Users\Admin\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1

If it show output like above please proceed to STEP 3

If it show nothing or error then please proceed with STEP 2 


STEP 2

Test-Path $profile
False

New-Item -path $profile -type file -force

Test-Path $profile
True

After this you can check again for profile

 $Profile

This time it will show you profile path as shown in STEP 1

STEP 3

Now you need open the profile file and the line for PowerCLI.

In PowerShell ISE window Type below then please press enter

PowerShell_ise $profile

it will open the profile file in edit section, like in image below:



Now you need to type in the text section:

cd "C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts" .\Initialize-PowerCLIEnvironment.ps1 cd c:\

Then Click on save button. Once done close PowerShell ISE.

For reference please see below:



Open Powershell ISE now this will come with PowerCLI Module loaded.

Enjoy....