Linked Questions
18 questions linked to/from Unable to access UNC Paths in Powershell remote session
1 vote
1 answer
3k views
Copy-Item gets "Access is Denied" running command via PSSession [duplicate]
I have two servers in a domain and I use the domain administrator account to run a script to scan with YARA some folders. I want to copy the result to SERVER-1. I have in SERVER-1 a shared folder to ...
-1 votes
1 answer
2k views
Access is denied when using Invoke-Command in Powershell [duplicate]
When i run Invoke-Command -ComputerName NY-TRAINING -ScriptBlock { Start-Process '\\Ny-wnorales\c$\CitrixReceiver 4.10.exe' } i get an Access is denied error message I have even tried it with
1 vote
0 answers
100 views
remote execution of powershell script that copies files, getting unauthorized access [duplicate]
So I have a Powershell script that reads a csv file that copies files from one remote directory to another. script runs script copies files from a directory on serverA to a directory on serverB. So ...
1 vote
1 answer
155 views
Powershell - Some commands won't run using Invoke-Command [duplicate]
I'm receiving 'Access Denied' errors when running commands that require elevated privileges on a remote machine. I can log into the remote machine and run the commands, but I can't run the commands ...
1 vote
0 answers
38 views
How to use powershell package manager remotely [duplicate]
I am trying to use package manager to install our packages. Those are .msi files and not Nuget Or Chocolatey Packages. I stored them on a share drive we have. Localy, everything run great. I run: ...
0 votes
0 answers
28 views
powershell cannot find system share when running scripts [duplicate]
When I run the script on the computer with the share using UNC path it works; e.g.: powershell.exe -ep bypass -file \\WIN7\SomeShare\myscript.ps1 When I run the script on every other computer I get "...
1 vote
0 answers
28 views
Opening a network share via powershell PSRemote not working properly [duplicate]
So I'm trying to invoke a script which creates a network drive like this: test1.ps1 Invoke-Command -ComputerName PCname -FilePath C:\Users\pcname\Desktop\test2.ps1 test2.ps1 New-PSDrive -Name "X&...
1 vote
0 answers
23 views
Running a Powershell Script inside of an PSSession with Invoke-Command [duplicate]
So I have a "Parent" Script, that does an invoke-command to some web servers, and inside of that invoke-command, I have a "Child" script that is removing and copying some files. Here's the Parent ...
8 votes
3 answers
13k views
Double hop access to copy files without CredSSP
hello, We have large environment with hundreds of virtual machines. During our services deployment we need to copy some files from build drop to all these machines. So, we have: User machine, where ...
2 votes
1 answer
3k views
Run RUNDLL32.EXE PRINTUI.DLL,PrintUIEntry remotely for Printer Settings Update
I have admin for same account on 2 Windows 2016 servers. Server1 has this folder\file: 'E:\Temp\ZEBRA_1.dat' If I open PowerShell (v4 or v5) (as admin) on Server1 and run this line of code everything ...
1 vote
1 answer
2k views
Passing a cmd-line IF statement through Invoke-Expression breaks on output
If I pass an IF statement through PowerShell's Invoke-Expression, the command appears to be running and completing, but then it appears that the output is being evaluated as a new command instead of ...
0 votes
1 answer
692 views
Creating Symbolic link to UNC path is not working?
I'm having problem getting symbolic links to work in powershell as I can't create the folder on the network drive. I've tried Test-NetConnection -ComputerName crex2cloud -Port 445 I get a response ...
1 vote
1 answer
303 views
PowerShell runtime execption in remote call
I intend to install remotely a sql-instance. I have a share with sql-binaries and a config-file. My script is: import-module sqlserver -DisableNameChecking $setupDrive = "\\sqlshare\sql_source\...
0 votes
1 answer
364 views
How can I call a Function, inside of a Function, inside of Invoke-Command ScriptBlock?
I have been racking my brain over this and scouring the internet for an answer, but I can't seem to find anything for my specific situation. I have created a set of Functions that help me add/remove ...
0 votes
0 answers
326 views
How do I run a powershell script from another script passing credentials?
I am currently running a powershell script that displays a message asking which script do you want to run. 1-5? Once the user selects this it imports credentials using Import-Credential on a clixml ...