Get-SecurityInfo Command | Vmware PowerCLI Reference

Get-SecurityInfo

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

Syntax

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

Parameters

Required Parameter Name Type Position Features Description
required
Entity VIObjectCore[] named
  • pipeline
Specifies the object to retrieve its security information. Supported objects are VirtualMachine, VMHost and HardDisk.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • wildcards
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.

Output

VMware.VimAutomation.Security.Types.V1.SecurityInfo.SecurityInfo

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.

Related Commands

SecurityInfo

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

SecurityPolicy

This cmdlet retrieves the security policy for virtual port groups or the default port security policy for virtual switches.

This cmdlet modifies the security policy for virtual port groups or the default port security policy for virtual switches.