PowerCLI Reference

Get-SecurityInfo

Synopsis

This cmdlet retrieves the security information of objects (VirtualMachine, HardDisk or VMHost).

Syntax

Get-SecurityInfo [-Entity] <VIObjectCore[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Unblock-VM

Detailed Description

This cmdlet retrieves the security information of objects. Returns the SecurityInfo instance that corresponds to the specified object.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
EntityVIObjectCore[]Specifies the object to retrieve its security information. Supported objects are VirtualMachine, VMHost and HardDisk.trueTrue (ByValue)
ServerVIServer[]Specifies the connected viserver on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default viservers. For more information about default viservers, see the description of the Connect-VIServer cmdlet.falseFalse

Return Type

VMware.VimAutomation.Security.Types.V1.SecurityInfo.html">SecurityInfo.SecurityInfo.html">SecurityInfo

Notes

The supported entities are only VirtualMachine, HardDisk and VMHost.

Examples

-------------------------- Example 1 --------------------------

Get-SecurityInfo -Entity MyObj*

Retrieves the security information of all the virtual machines and all the VMHosts whose names starting with "MyObj".

-------------------------- Example 2 --------------------------

Get-VM MyVM | Get-HardDisk | Get-SecurityInfo

Retrieves security information of all disks of 'MyVM' virtual machine.

-------------------------- Example 3 --------------------------

$vmHosts = Get-VMHost
Get-SecurityInfo -Entity $vmHosts

Retrieves security information of all the VMHosts available on the connected servers.

-------------------------- Example 4 --------------------------

$myVm1 = Get-VM -Name MyVM1
$myVm2 = Get-VM -Name MyVM2
Get-SecurityInfo -Entity $myVM1, $myVM2

Retrieves security information of the given two virtual machines.


Copyright © VMware, Inc. All rights reserved.