New-MaskingSet

New-MaskingSet

Creates a new masking set.

構文

Parameter Set: ByFriendlyName
New-MaskingSet [-StorageSubSystemFriendlyName] <String[]> [-AsJob] [-CimSession <CimSession[]> ] [-DeviceAccesses <DeviceAccess[]> ] [-DeviceNumbers <String[]> ] [-FriendlyName <String> ] [-HostType <HostMode> ] [-InitiatorAddresses <String[]> ] [-TargetPortAddresses <String[]> ] [-ThrottleLimit <Int32> ] [-VirtualDiskNames <String[]> ] [ <CommonParameters>]

Parameter Set: ByName
New-MaskingSet -StorageSubSystemName <String[]> [-AsJob] [-CimSession <CimSession[]> ] [-DeviceAccesses <DeviceAccess[]> ] [-DeviceNumbers <String[]> ] [-FriendlyName <String> ] [-HostType <HostMode> ] [-InitiatorAddresses <String[]> ] [-TargetPortAddresses <String[]> ] [-ThrottleLimit <Int32> ] [-VirtualDiskNames <String[]> ] [ <CommonParameters>]

Parameter Set: ByUniqueId
New-MaskingSet -StorageSubSystemUniqueId <String[]> [-AsJob] [-CimSession <CimSession[]> ] [-DeviceAccesses <DeviceAccess[]> ] [-DeviceNumbers <String[]> ] [-FriendlyName <String> ] [-HostType <HostMode> ] [-InitiatorAddresses <String[]> ] [-TargetPortAddresses <String[]> ] [-ThrottleLimit <Int32> ] [-VirtualDiskNames <String[]> ] [ <CommonParameters>]

Parameter Set: InputObject (cdxml)
New-MaskingSet -InputObject <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-DeviceAccesses <DeviceAccess[]> ] [-DeviceNumbers <String[]> ] [-FriendlyName <String> ] [-HostType <HostMode> ] [-InitiatorAddresses <String[]> ] [-TargetPortAddresses <String[]> ] [-ThrottleLimit <Int32> ] [-VirtualDiskNames <String[]> ] [ <CommonParameters>]

詳細説明

The New-MaskingSet cmdlet creates a new masking set. Masking sets allow management of groups of TargetPort, VirtualDisk, and InitiatorID objects to manage access to virtual disks, either for individual computers or multiple computers in the case of a Failover Cluster configuration. Once a masking set is created, adding or removing a virtual disk grants or removes access to all resources in the masking set. Adding or removing initiator addresses can show or hide the virtual disks in this masking set to hosts.

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DeviceAccesses<DeviceAccess[]>

Specifies the way in which initiators can access the virtual disk(s) that are part of this masking set. You must specify a DeviceAccesses value for each virtual disk specified by the VirtualDiskNames parameter. Allowed values are NoAccess, ReadOnly, ReadWrite, and Unknown

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DeviceNumbers<String[]>

Specifies the device numbers for one or more virtual disks. Some storage providers do not use device numbers.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-FriendlyName<String>

Specifies the friendly name for the new masking set.

エイリアス

MaskingSetFriendlyName

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-HostType<HostMode>

Specifies the host operating system or other host environmental factors that may influence the behavior that the storage system should have when showing a virtual disk to an initiator.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-InitiatorAddresses<String[]>

Specifies the initiator addresses.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-InputObject<CimInstance[]>

Accepts a StorageSubsystem object from the pipeline as input. Enter a StorageSubsystem CIM object, which is returned by the Get-StorageSubSystem cmdlet.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-StorageSubSystemFriendlyName<String[]>

Specifies the friendly name of the storage subsystem.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-StorageSubSystemName<String[]>

Specifies the name of the storage subsystem provided by the Storage Management.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-StorageSubSystemUniqueId<String[]>

Specifies the UniqueID of the storage subsystem to use.

エイリアス

StorageSubsystemId

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-TargetPortAddresses<String[]>

Specifies one or more target port addresses.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ThrottleLimit<Int32>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VirtualDiskNames<String[]>

Specifies one or more virtual disk names to include in the masking set.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Microsoft.Management.Infrastructure.CimInstance オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。シャープ記号 (#) の後のパスは、基になる WMI オブジェクトの名前空間とクラス名です。

Example 1: Create a masking set

This example collects the necessary information and then creating a new masking set to expose the virtual disks that have the friendly names VirtualDisk01 and VirtualDisk02 to the local machine.

PS C:\> $StorageSubsystem = Get-StorageSubsystem
PS C:\> $VirtualDisks = Get-VirtualDisk -Name "Virtual01,Virtual02"
PS C:\> $Initiator = Get-InitiatorPort
PS C:\> $Target = Get-TargetPort
PS C:\> New-MaskingSet -StorageSubsystemFriendlyName $StorageSubsystem.FriendlyName -VirtualDiskNames $VirtualDisks.Name -FriendlyName "MyFirstMaskingSet" -InitiatorAddresses $Initiator.NodeAddress -TargetPortAddresses $Target.PortAddress

関連トピック

Get-MaskingSet

Get-InitiatorPort

Get-StorageSubsystem

Get-TargetPort

Get-VirtualDisk

Remove-MaskingSet

Rename-MaskingSet