Using a shared file variable in powershell -
i trying execute remote command perform netsh command. command export of nps configuration file , output shared path. but, command give me error "access denied"
. realised problem lies in shared path value (\\shared-pc\temp
). without it, able execute eg (c:\users\user1\desktop
). able browse shared location local , remote pc. advice appreciated. below command. thanks.
invoke-command -computername nap1 -scriptblock {netsh nps export filename = "\\shared-pc\temp\config.xml" exportpsk = yes}
this double-hop / second-hop authentication problem. you're credentials passed nap1
-server, nap1
doesn't have permission pass on same credentials(yours) fileserver access.
the solution use credssp
there mixed feelings how smart use in production enviroment, that's company decide.
Comments
Post a Comment