August 23, 2017

Reset password of vCenter 6 - vCenter server service account

Reset password of vCenter 6 - vCenter server service account


On the vCenter Server
  1. Log in to vCenter Server with a domain administrator account. If the Platform Services Controller is installed separate from vCenter Server, log in to the Platform Services Controller server.
  2. Open an elevated command prompt.
  3. Run c:\> "%VMWARE_CIS_HOME%\vmdird\vdcadmintool.exe".

    This console loads:

    ===============================
    Please select:
    0. exit
    1. Test LDAP connectivity
    2. Force start replication cycle
    3. Reset account password
    4. Set log level and mask
    5. Set vmdir state
    ===============================
  4. Press 3 to enter the Reset account password option.
  5. When prompted for the Account UPN, enter:

    User@vSphere_Domain_Name.local
    A new password is generated.

August 10, 2017

How to Get VM Snapshot details to a Table - easy way

Get VM Snapshot details to a Table - easy way

Get-Cluster TEST CLUSTER | Get-VM | Get-Snapshot | Format-Table -Property vm,name,sizeGB,created

 To get a list of all VM Snapshots for VMs managed by vCenter you can type the following command:
get-vm | get-snapshot | format-list
The command above will give you the following properties:
Description
Created
Quiesced
PowerState
VM
VMId
Parent
ParentSnapshotId
ParentSnapshot
Children
SizeMB
IsCurrent
IsReplaySupported
ExtensionData
Id
Name
Uid

How to change PowerShell terminal defaults size


The PowerShell terminal defaults to a width of 80 columns, but sometimes a user will need a larger or smaller display width



$pshost = Get-Host              # Get the PowerShell Host.
$pswindow = $pshost.UI.RawUI    # Get the PowerShell Host's UI.

$newsize = $pswindow.BufferSize # Get the UI's current Buffer Size.
$newsize.width = 200            # Set the new buffer's width to 200 columns.
$pswindow.buffersize = $newsize # Set the new Buffer Size as active.

$newsize = $pswindow.windowsize # Get the UI's current Window Size.
$newsize.width = 200            # Set the new Window Width to 200 columns.
$pswindow.windowsize = $newsize # Set the new Window Size as active.