Add & Remove -datastore through Power CLI

Add  & Remove -datastore through Power CLI

connect-viserver -server vcenter name -user xxxx   -password xxxx

get-vmhost -location $cluster | new-datastore -Name Datastore -Path $remotePath -NfsHost $remoteHost

Get-VMHost -Location $cluster | Remove-Datastore xxxxxxxxxxx -Confirm:$false

Name                           Port  User

vcenter name              443   domain\username

PowerCLI C:\> $cluster = get-cluster -name cluster name start with*


PowerCLI C:\> Get-VMHost -Location $cluster | Remove-xxxxxxxxxxxx -Confirm:$false

Comments

Popular posts from this blog

Using Non-Maskable Interrupt (NMI) facilities to troubleshoot unresponsive VMware Virtual Machine.

Removing invalid linked clone entries automatically using the ViewDBChk tool

VMTool update steps on Horizon VDI Parent VM