Skip to content

Test-LockdownMode

Synopsis

Test if ESXi hosts in a cluster are in lockdown mode.

Syntax

Test-LockdownMode [-server] <String> [-user] <String> [-pass] <String> [-cluster] <String> [<CommonParameters>]

Description

The Test-LockdownMode cmdlet tests if ESXi hosts in a cluster are in lockdown mode. The cmdlet returns an error if an ESXi host in the cluster is in lockdown mode.

Examples

Example 1

Test-LockdownMode -server sfo-m01-vc01.sfo.rainpole.io -user administrator@vsphere.local  -Pass VMw@re1! -cluster sfo-m01-cl01

This example checks if some of the ESXi hosts in the cluster sfo-m01-cl01 is in lockdown mode.

Parameters

-server

The FQDN of the vCenter Server.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-user

The username to authenticate to vCenter Server.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-pass

The password to authenticate to vCenter Server.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-cluster

The name of the cluster to be checked for locked down ESXi hosts if any.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Common Parameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.