Community

Subscribe
Highlighted

Re: How to set File Level Security

To add a new module to WFA, you need to login to the server hosting WFA and navigate to the following path: (xxxx being whatever path you installed WFA to)

xxxx\NetApp\WFA\PoSH\Modules

Add the module into this folder. Then go up one level to the PoSH folder and edit the profile.ps1 file with Notepad.

It should look something like below. Just add another line and match it to the previous ones, while changing the end to the name of the folder your module is in.

$ModulesDir = split-path $MyInvocation.MyCommand.Path

Import-Module $ModulesDir\Modules\WFA

Import-Module $ModulesDir\Modules\WFAWrapper

Import-Module $ModulesDir\Modules\DataONTAP

Save the file. You may need to restart the NetApp WFA Server process in order to get it to take, I can't remember.

Re: How to set File Level Security

I tried exactly same steps. I have all the Modules in C:\Program Files\netapp\WFA\PoSH\Modules      directory.

PS C:\Program Files\netapp\wfa\PoSH> type profile.ps1
$ModulesDir = split-path $MyInvocation.MyCommand.Path

Import-Module $ModulesDir\Modules\WFA
Import-Module $ModulesDir\Modules\WFAWrapper
Import-Module $ModulesDir\Modules\DataONTAP
Import-Module $ModulesDir\Modules\NTFSSecurity
PS C:\Program Files\netapp\wfa\PoSH> dir

    Directory: C:\Program Files\netapp\wfa\PoSH

Mode    Inherits             LastWriteTime    Size(M) Name
----    --------             -------------    ------- ----
d----       True       4/24/2013   5:20 PM            Modules
-a---       True       4/24/2013   3:12 PM          0 profile.ps1

PS C:\Program Files\netapp\wfa\PoSH> cd modules
PS C:\Program Files\netapp\wfa\PoSH\modules> dir

    Directory: C:\Program Files\netapp\wfa\PoSH\modules

Mode    Inherits             LastWriteTime    Size(M) Name
----    --------             -------------    ------- ----
d----       True        4/3/2013   7:47 AM            DataONTAP
d----       True       4/24/2013   5:20 PM            NTFSSecurity
d----       True        4/3/2013   7:47 AM            WFA
d----       True        4/3/2013   7:47 AM            WFAWrapper

PS C:\Program Files\netapp\wfa\PoSH\modules>

After restarting of WFA services and Reboot of WFA server, I still see same message in WFA logs that The term 'Add-Ace' is not recognized as the name of a cmdlet

Re: How to set File Level Security

I don't think that profile.ps1 file is loading things prior to code execution.  (Bug?)

Try putting your custom modules folder in here instead of <wfa_install>\PoSH\modules:

C:\Windows\System32\WindowsPowerShell\v1.0\Modules

And don't worry about editing the profile.ps1.  If you did edit it, I would suggest removing your edits.

I downloaded the NTFSSecurity module, extracted it, and moved the extracted folder and all contents to the location above.  Then, I created a dummy WFA command that only did this:


$modules = get-module -listavailable

Get-WFALogger -Info -message "$modules"

I used WFA's command test button to test that code, and noticed that it WAS bringing in the NTFSSecurity modules.  That should be all that's needed to solve your problem.

I haven't tried any of the cmdlets in NTFSSecurity module on a CIFS share.  Will be curious to know if this works for you.

Cheers,

Dave