Unsolved

This post is more than 5 years old

8 Posts

4924

June 18th, 2013 10:00

Powershell scripting against a VNX Cifs server

Hi

One of our system administrators would like to do some powershell scripting against a VNX Cifs Server.

Im not big into the windows world, but he tells me that WMI is not possible.

The only proper reference i found on the interweb was this one

http://http://activedirectory.ncsu.edu/advanced-topics/scripting-center/celerra-powershell-example/

But i think he is looking more of a powershell commandlets that make it possible to add/removes shares and permissions ?

Anybody had any experience with this ?

/antr

4 Operator

 • 

8.6K Posts

June 18th, 2013 11:00

Correct – you cant use WMI since that requires a provider on the NAS system (which nobody except Windows has).

You can use Powershell commands that use native Win32 calls like for creating a share or manipulating permissions.

VNX/Celerra is compatible with Windows API’s there – otherwise you couldn’t use commands like rmtshare or cacls against a VNX CIFS server

You should also look at EMC Storage Integrator – that has some Powershell commandlets for VNX

Available as a free download from support.emc.com

Rainer

4 Operator

 • 

8.6K Posts

November 8th, 2016 11:00

Other option is to use some PowerShell cmdlets that we provide

Should work on VNX1/VNX2/VNXe/Unity

downloadable here https://download.emc.com/downloads/DL46698_EMC-CMDLETS-Powershell-for-Windows-1.0.exe?source=OLS


list of cmdlets included:


Add-LG   :    cmdlet to add a new local group on a server name

Add-LGMember   :    cmdlet to add a member in a given local group on a server name

Add-Share   :    cmdlet to create a share on a server name

Add-ShareAcl   :    cmdlet to add an ACE in a share's ACL on a server name

Add-SharePerms   :    cmdlet to add an access in share's permissions on a server name

Remove-LG   :    cmdlet to delete a local group on a server name

Remove-LGMember   :    cmdlet to delete a member of a Local Group on a server name

Remove-Session   :    cmdlet to delete a session open on a server name

Remove-Share   :    cmdlet to remove a share on a server name

Remove-ShareAcl   :    cmdlet to remove an ACE in a share's ACL on a server name

Remove-SharePerms    :    cmdlet to remove an access in share's permissions on a server name

Set-ShareFlags   :    cmdlet to set share flags on a given server name

Show-AccountSid   :    cmdlet to display SID of a given user

Show-ACL   :    cmdlet to display the share's ACL on a server name

Show-LG   :    cmdlet to enumerate local group on a server name

Show-LGMembers   :    cmdlet to enumerate members of a local group on a server name

Show-RootDirMembers    :    cmdlet to list the root directory contain of a server name

Show-SecurityEventLog    :    cmdlet to display the eventlogs of a server name

Show-Sessions   :    cmdlet to enumerate open sessions on a server name

Show-ShareAcl   :    cmdlet to display the share's ACL on a server name

Show-ShareFlags   :    cmdlet to show share's flags values on a server name

Show-SharePerms   :    cmdlet to enumerate access contain in a share's permissions on a server name


1 Message

March 28th, 2022 10:00

Hello Rainer_EMC,

I want to set the share permissions on a Dell Unity 400 (5.0.8.0.5.007) via CLI.

I read your postings and downloaded https://download.emc.com/downloads/DL46698_EMC-CMDLETS-Powershell-for-Windows-1.0.exe?source=OLS to a Windows Server 2016 Std system.

I could add share permissions for a AD group. But when I tried to add a second AD group to the share permissions, it failed:

 

PS C:\temp> Add-SharePerms -servername bsaa-fsemcb1 -sharename 001824-test01$ -domainname gfk.com -username "d-re-fs-001821-techcp-RW" -perm ReadandChange

You have succeefully modify ACL on the following share :001824-test01$


PS C:\temp> Add-SharePerms -servername bsaa-fsemcb1 -sharename 001824-test01$ -domainname gfk.com -username "d-re-svr-emeastorage-administrator" -perm FullControl
Add-SharePerms : String cannot be of zero length.
Parameter name: accountName
At line:1 char:1
+ Add-SharePerms -servername bsaa-fsemcb1 -sharename 001824-test01$ -do ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-SharePerms], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,addshareperms.addshareperms

#################################################################

When try to add share permissions in another order it fails again:

PS C:\Windows\system32> Add-SharePerms -servername bsaa-fsemcb1 -sharename 001824-test01$ -domainname gfk.com -username 'domain admins' -perm ReadandChange

You have succeefully modify ACL on the following share :001824-test01$


PS C:\Windows\system32> Add-SharePerms -servername bsaa-fsemcb1 -sharename 001824-test01$ -domainname gfk.com -username d-re-svr-emeastorage-administrator -perm ReadandChange

You have succeefully modify ACL on the following share :001824-test01$


PS C:\Windows\system32> Add-SharePerms -servername bsaa-fsemcb1.gfk.com -sharename 001824-test01$ -domainname gfk.com -username d-re-fs-001821-techcp-RW -perm FullControl
Add-SharePerms : String cannot be of zero length.
Parameter name: accountName
At line:1 char:1
+ Add-SharePerms -servername bsaa-fsemcb1.gfk.com -sharename 001824-tes ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-SharePerms], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,addshareperms.addshareperms

#################################################################

Maybe the PowerShell cmdlets are outdated and cannot run with Windows Server 2016?

Could you give me a hint here?

Moderator

 • 

7.7K Posts

March 28th, 2022 16:00

Hello Harriwaltan,

The version that you are using will work for windows 2008 & 2012.  There is a newer version PowerShell Module for Dell EMC Unity 1.1 which has the newer cmdlets. Here is the link

https://dell.to/3iGNzrF

1 Message

April 12th, 2022 22:00

Hi Sam
unfortunately the link reports "missing user information". I'm successfully logged in with my Dell Account.

Btw. are there any cmdlets to check and configure  DFS on the VNX? Some of the standard powershell modules for DFS does not work for VNX based DFS.

Thanks in Advance

Jens 

Moderator

 • 

7.7K Posts

April 13th, 2022 09:00

Hello Jens,

Check you pop up blocker, as the link is direct to the download and will start once you have logged in.  I am not seeing any cmdlets for DFS on the vnx.

Moderator

 • 

9.4K Posts

December 14th, 2022 11:00

Hi,

Which VNX devices are you using and what version is the software at? VNX has an end of life product for 5 years, newer products have additional features for scripting.

1 Message

December 14th, 2022 11:00

I downloaded the module, tried some of the commands and was disappointed to say the least. Your tooling doesn't seem to be up to par with what the rest of the industry is doing which I will make sure is echoed when ever I am asked about your products, I can't recommend them. In one hand you want to capture big $$$ audience with your hardware (VNX), on the other hand your underlying software is more in the fraction of a $ audience (mom and pop), no parity what so ever.

No Events found!

Top