Hi all, I am trying to map a drive on the wfa server from a script so I can set ntfs permissions. I am using net use t: \\192.168.77.182\cifstest
it works from the command line. However, when I try to run from the script, I get error 1223. Below is what I am trying to do and relevant details below:
$ErrorArg = 'Stop'
$credentials = Get-WfaCredentials -Host 'local'
$expression = $("net use s: \\192.168.77.182\cifstest")
Get-WFALogger -Info -message $("creds: " + $credentials)
Get-WFALogger -Info -message $("Command to invoke: " + $expression)
$job = Invoke-Command -computername localhost -credential $credentials -scriptblock {
$output = Invoke-Expression $args[0]
} -argumentlist $expression -ErrorAction $ErrorArg
relevant details:
WFA service using domain admin account
svm has domain admin account in the vserver admin group
local cached credential is domain admin & password
If anyone has a known good alternate way to do this, I would be grateful for the tip
steve