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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -