Application Integration
1752729 Members
5516 Online
108789 Solutions
New Discussion юеВ

PowerShell Parameters Not Working

 
SOLVED
Go to solution
wave2453
Occasional Advisor

PowerShell Parameters Not Working

Hi All,

I have been trying to script out some LUN creation with the PSTK and noticed that some parameters come back a unrecognized. Below is an example.

PS C:\WINDOWS\system32> New-NSVolume -name test -size 10240 -perfpolicy 0316a3d10c4302926200000000000000000000001f -folder 2f16a3d10c4
3029262000000000000000000000001 -multi_initiator 1 -access_control_records
New-NSVolume : A parameter cannot be found that matches parameter name 'access_control_records'.
At line:1 char:162
+ ... 62000000000000000000000001 -multi_initiator 1 -access_control_records
+                                                   ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-NSVolume], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,New-NSVolume

PS C:\WINDOWS\system32>

I know that -access_control_records is a parameter I can call but it doesn't work. Has anyone else run into this issue? Does anyone know of a fix? I may be doing something wrong and if I am the help commands and error messages are not making that clear.

2 REPLIES 2
Thomas_Lam_HK
HPE Pro
Solution

Re: PowerShell Parameters Not Working

From the command help:

 

DESCRIPTION
Create operation is used to create or clone a volume. Creating volumes requires name and size attributes. Cloning
volumes requires clone, name and base_snap_id attributes where clone is set to true. Newly created volume will not
have any access control records, they can be added to the volume by create operation on access_control_records
object set. Cloned volume inherits access control records from the parent volume.


RELATED LINKS

REMARKS
To see the examples, type: "get-help New-NSVolume -examples".
For more information, type: "get-help New-NSVolume -detailed".
For technical information, type: "get-help New-NSVolume -full".



Thomas Lam - Global Storage Field CTO


I work for HPEAccept or Kudo
wave2453
Occasional Advisor

Re: PowerShell Parameters Not Working

Then why even have that as an option on the New-NSVolume command?