«

»

Apr 21 2014

Nutanix 4.0 PowerShell has Full Feature Coverage

One of the big new things for workflows and automation in Nutanix NOS 4.0 are the PowerShell cmdlets to interact with the Nutanix API’s. The POSH library covers the entire extent and functionality of the Nutanix GUI. Basically, anything that can be done via GUI can also be done via REST and can also be done via POSH; including Alerts, Authentication, Backup and Disaster Recovery, Clusters, Containers, Disks, VM and Host, Remote Sites, Multi-Cluster, Storage Pools, SNMP etc.

Nutanix requires Powershell 2.0+ and .NET 4.0 installed on the computer running the commands. The command may be manually executed or via Powershell scripts and pipelining is also supported.

This article is just an introduction to Nutanix Powershell. In future articles I will select and explain specific cmdlets. In the meantime, to get help descriptions just use: Get-Help

 

The example below demonstrates how to establish a connection to a Nutanix cluster.

Screen Shot 2014-04-13 at 6.00.05 PM

 

The example below will list all Nutanix containers.

Screen Shot 2014-04-13 at 6.00.43 PM

 

Below you will find the full list with all cmdlets supported with Nutanix. To generate this list just use the following command: get-module | ForEach-Object {Get-Command -Module $_} | ForEach-Object {$_.Name}

Important: Please note these cmdlts are from the Beta version and they may change for the GA release. Some of these changes will include namespace changes to include {NTNX} in every cmdlet.

 

Name ModuleName
Acknowledge-Alert AlertsAdministration
Get-AlertMetadata AlertsAdministration
Get-AlertMetadataById AlertsAdministration
Get-Alerts AlertsAdministration
Get-HardwareAlerts AlertsAdministration
Get-StorageAlerts AlertsAdministration
Resolve-Alert AlertsAdministration
Update-AlertMetadata AlertsAdministration
Add-AuthTypes AuthConfigAdministration
Add-DirectoryConfig AuthConfigAdministration
Enable-ClientAuth AuthConfigAdministration
Get-AllDirectoryConfigs AuthConfigAdministration
Get-AuthConfig AuthConfigAdministration
Get-AuthTypes AuthConfigAdministration
Get-ClientAuth AuthConfigAdministration
Get-DirectoryConfig AuthConfigAdministration
Remove-AuthConfig AuthConfigAdministration
Remove-AuthTypes AuthConfigAdministration
Remove-DirectoryConfig AuthConfigAdministration
Set-AuthTypes AuthConfigAdministration
Update-AuthConfig AuthConfigAdministration
Update-DirectoryConfig AuthConfigAdministration
Abort-Replication BackupAndDrAdministration
Add-CronSchedule BackupAndDrAdministration
Add-OutOfBandSchedule BackupAndDrAdministration
Add-ProtectionDomain BackupAndDrAdministration
Add-VmsByNamesToProtectionDoman BackupAndDrAdministration
Clear-CronSchedules BackupAndDrAdministration
Clear-RetentionPolicy BackupAndDrAdministration
Get-AlertsForProtectionDomain BackupAndDrAdministration
Get-AllSnapshots BackupAndDrAdministration
Get-ConsistencyGroups BackupAndDrAdministration
Get-ConsistencyGroupsInPd BackupAndDrAdministration
Get-CronSchedules BackupAndDrAdministration
Get-EventsForProtectionDomain BackupAndDrAdministration
Get-OutOfBandSchedules BackupAndDrAdministration
Get-OutOfBandSchedulesForPd BackupAndDrAdministration
Get-PendingActions BackupAndDrAdministration
Get-PendingActionsForPd BackupAndDrAdministration
Get-PendingReplications BackupAndDrAdministration
Get-PendingReplicationsInPd BackupAndDrAdministration
Get-ProtectionDomainAlerts BackupAndDrAdministration
Get-ProtectionDomainByName BackupAndDrAdministration
Get-ProtectionDomainEvents BackupAndDrAdministration
Get-ProtectionDomains BackupAndDrAdministration
Get-ProtectionDomainStats BackupAndDrAdministration
Get-Replications BackupAndDrAdministration
Get-ReplicationsForPd BackupAndDrAdministration
Get-SnapshotsForPd BackupAndDrAdministration
Get-UnprotectedVms BackupAndDrAdministration
Mark-ProtectionDomainActive BackupAndDrAdministration
Mark-ProtectionDomainForRemoval BackupAndDrAdministration
Mark-ProtectionDomainInactive BackupAndDrAdministration
Migrate-ProtectionDomain BackupAndDrAdministration
Modify-Snapshot BackupAndDrAdministration
Remove-CronSchedule BackupAndDrAdministration
Remove-OutOfBandSchedule BackupAndDrAdministration
Remove-Snapshot BackupAndDrAdministration
Remove-VmsFromProtectionDoman BackupAndDrAdministration
Replace-CronSchedule BackupAndDrAdministration
Restore-Entities BackupAndDrAdministration
Rollback-ProtectionDomain BackupAndDrAdministration
Set-RetentionPolicy BackupAndDrAdministration
Update-Replication BackupAndDrAdministration
Add-EmailAlertContact ClusterAdministration
Add-NameServer ClusterAdministration
Add-NfsSubnetWhitelist ClusterAdministration
Add-NtpServer ClusterAdministration
Add-PublicKey ClusterAdministration
Do-SpotlightSearch ClusterAdministration
Get-ClusterInfo ClusterAdministration
Get-ClusterStats ClusterAdministration
Get-EmailAlertContacts ClusterAdministration
Get-EmailAlertsStatus ClusterAdministration
Get-NameServers ClusterAdministration
Get-NfsSubnetWhitelist ClusterAdministration
Get-NtpServers ClusterAdministration
Get-PublicKey ClusterAdministration
Get-PublicKeys ClusterAdministration
Get-RackableUnit ClusterAdministration
Get-RackableUnits ClusterAdministration
Get-RemoteSupportStatus ClusterAdministration
Get-SmtpServer ClusterAdministration
Get-SmtpServerSecurityModeType ClusterAdministration
Remove-EmailAlertContact ClusterAdministration
Remove-NameServer ClusterAdministration
Remove-NfsSubnetWhitelist ClusterAdministration
Remove-NtpServer ClusterAdministration
Remove-PublicKey ClusterAdministration
Remove-RackableUnit ClusterAdministration
Remove-SmtpServer ClusterAdministration
Send-EmailSmtpServer ClusterAdministration
Update-ClusterParams ClusterAdministration
Update-EmailAlerts ClusterAdministration
Update-RemoteSupport ClusterAdministration
Update-SmtpServer ClusterAdministration
Get-AlertsForCluster ClustersDataQuery
Get-Cluster ClustersDataQuery
Get-ClusterAlerts ClustersDataQuery
Get-ClusterEvents ClustersDataQuery
Get-Clusters ClustersDataQuery
Get-ClusterStats ClustersDataQuery
Get-EventsForClusters ClustersDataQuery
Connect-NutanixCluster Common
Disconnect-NutanixCluster Common
Get-NutanixCluster Common
Get-NutanixCmdletsInfo Common
Add-Container ContainerAdministration
Add-NfsDatastores ContainerAdministration
Get-AlertsForContainer ContainerAdministration
Get-Container ContainerAdministration
Get-ContainerAlerts ContainerAdministration
Get-ContainerEvents ContainerAdministration
Get-Containers ContainerAdministration
Get-ContainerStats ContainerAdministration
Get-EventsForContainer ContainerAdministration
Get-NfsDatastores ContainerAdministration
Get-VDisksInContainer ContainerAdministration
Remove-Container ContainerAdministration
Remove-NfsDatastores ContainerAdministration
Update-Container ContainerAdministration
Begin-RemoveDisk DiskAdministration
Get-AlertsForDisk DiskAdministration
Get-Disk DiskAdministration
Get-DiskAlerts DiskAdministration
Get-DiskEvents DiskAdministration
Get-Disks DiskAdministration
Get-DiskStats DiskAdministration
Get-EventsForDisks DiskAdministration
Get-HealthCheckSummaryForDisks DiskAdministration
Acknowledge-Event EventsAdministration
Get-Events EventsAdministration
Get-HardwareEvents EventsAdministration
Get-StorageEvents EventsAdministration
Get-HealthCheck HealthCheckAdministration
Get-HealthChecks HealthCheckAdministration
Update-HealthCheck HealthCheckAdministration
Get-AlertsForHost HostAdministration
Get-EventsForHost HostAdministration
Get-HealthCheckSummaryForHosts HostAdministration
Get-Host HostAdministration
Get-HostAlerts HostAdministration
Get-HostEvents HostAdministration
Get-Hosts HostAdministration
Get-HostStats HostAdministration
Add-HttpProxy HttpProxyAdministration
Get-HttpProxies HttpProxyAdministration
Get-HttpProxy HttpProxyAdministration
Remove-HttpProxy HttpProxyAdministration
Update-HttpProxy HttpProxyAdministration
Get-AllowanceForFeature LicenseAdministration
Get-Allowances LicenseAdministration
Get-ClusterInfo LicenseAdministration
Get-CurrentLicense LicenseAdministration
Add-ToMulticluster MulticlusterAdministration
Get-AllClusterExternalState MulticlusterAdministration
Get-ClusterDataState MulticlusterAdministration
Get-ClusterExternalDetails MulticlusterAdministration
Get-ClusterExternalState MulticlusterAdministration
Remove-FromMulticluster MulticlusterAdministration
Add-RemoteSite RemoteSiteAdministration
Get-AlertsForRemoteSite RemoteSiteAdministration
Get-AllRemoteSites RemoteSiteAdministration
Get-AllRemoteSiteSnapshots RemoteSiteAdministration
Get-AllSnapshots RemoteSiteAdministration
Get-EventsForRemoteSite RemoteSiteAdministration
Get-PendingReplications RemoteSiteAdministration
Get-PendingReplicationsInRemote RemoteSiteAdministration
Get-RemoteSite RemoteSiteAdministration
Get-RemoteSiteAlerts RemoteSiteAdministration
Get-RemoteSiteEvents RemoteSiteAdministration
Get-RemoteSiteStats RemoteSiteAdministration
Mark-RemoteSiteForRemoval RemoteSiteAdministration
Update-RemoteSite RemoteSiteAdministration
Add-ServiceCenter ServiceCenterAdministration
Get-ServiceCenter ServiceCenterAdministration
Get-ServiceCenters ServiceCenterAdministration
Remove-ServiceCenter ServiceCenterAdministration
Update-ServiceCenter ServiceCenterAdministration
Clear-KerberosSeurityConfig SmbServerAdministration
Get-KerberosSeurityConfig SmbServerAdministration
Update-KerberosSeurityConfig SmbServerAdministration
Add-SnmpTransports SnmpAdministration
Add-SnmpTrap SnmpAdministration
Add-SnmpUser SnmpAdministration
Get-SnmpInfo SnmpAdministration
Get-SnmpStatus SnmpAdministration
Get-SnmpTransports SnmpAdministration
Get-SnmpTrap SnmpAdministration
Get-SnmpTraps SnmpAdministration
Get-SnmpUser SnmpAdministration
Get-SnmpUsers SnmpAdministration
Remove-SnmpTransports SnmpAdministration
Remove-SnmpTrap SnmpAdministration
Remove-SnmpUser SnmpAdministration
Set-SnmpStatus SnmpAdministration
Update-SnmpTrap SnmpAdministration
Update-SnmpUser SnmpAdministration
Add-StoragePool StoragePoolAdministration
Get-AlertsForStoragePool StoragePoolAdministration
Get-EventsForStoragePool StoragePoolAdministration
Get-StoragePool StoragePoolAdministration
Get-StoragePoolAlerts StoragePoolAdministration
Get-StoragePoolEvents StoragePoolAdministration
Get-StoragePools StoragePoolAdministration
Get-StoragePoolStats StoragePoolAdministration
Remove-StoragePool StoragePoolAdministration
Update-StoragePool StoragePoolAdministration
Add-Snapshot VDiskAdministration
Add-VDisk VDiskAdministration
Get-AlertsForVDisk VDiskAdministration
Get-AllSnapshots VDiskAdministration
Get-AllVDisks VDiskAdministration
Get-EventsForVDisk VDiskAdministration
Get-SnapshotByName VDiskAdministration
Get-VDisk VDiskAdministration
Get-VDiskAlerts VDiskAdministration
Get-VDiskEvents VDiskAdministration
Get-VDiskSnapshots VDiskAdministration
Get-VDiskStats VDiskAdministration
Remove-VDisk VDiskAdministration
Update-VDisk VDiskAdministration
Get-VirtualDisk VirtualDiskAdministration
Get-VirtualDisks VirtualDiskAdministration
Get-VirtualDiskStats VirtualDiskAdministration
Get-AlertsForVM VMManagementService
Get-EventsForVM VMManagementService
Get-HealthCheckSummaryForVMs VMManagementService
Get-VDisksInVm VMManagementService
Get-VirtualDisksInVm VMManagementService
Get-VM VMManagementService
Get-VMAlerts VMManagementService
Get-VMEvents VMManagementService
Get-VMs VMManagementService
Get-VMStats VMManagementService
Get-VStoreById VStoreAdministration
Get-VStores VStoreAdministration
Protect-VStore VStoreAdministration
Un-ProtectVStore VStoreAdministration

 

This article was first published by Andre Leibovici (@andreleibovici) at myvirtualcloud.net

Leave a Reply