Subscribe

WFA with PS test-path

Has anyone used PS test-path in WFA to check if a share exists? have the following lines that work perfect outside of WFA in the PS environment but inside of WFA it fails to return the correct value. [String]$Path = "\\server\sharename$\foldername" $retval = Test-Path $Path

Re: WFA with PS test-path

Do you have the 'Netapp WFA Server' Service running as a domain account? If not, you will need to set that up with a domain account. Also, make sure that account has rights to the share.

Re: WFA with PS test-path

yes to both of those

Re: WFA with PS test-path

What's the error message when the command is ran in WFA?

Re: WFA with PS test-path

not an error it just returns the wrong value.  If the folder is actually there, it returns False saying it couldnt find it.

Re: WFA with PS test-path

Hmm That is interesting. I would be interested to see if you can log out the whoami command.

 

Get-WFALogger -Info -message ("I am: " + (whoami)) 

Get-WFALogger -Info -message ("I am going to test out: " + $Path) 

Get-WFALogger -Info -message ("Accounts in the ACL:"+(get-acl $path).access.identityreference )