【发布时间】:2021-01-27 17:21:22
【问题描述】:
您好,我在远程访问文件时遇到访问被拒绝错误,即使我可以访问共享位置。Kerberos 凭据委托已启用
PS C:\Users> $uname = "abrac\svc-igniopro-connect"
$password = "P@er***" | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $uname,$password
Invoke-Command -ComputerName EABP01IGCHEA01 -Credential $cred -ScriptBlock {Get-Content "\\Ebrfile01\tcs\IT\INFRA IGNIO SOX\vdi NS list 1.csv"}
Access is denied
+ CategoryInfo : PermissionDenied: (\\Ebrfile01\tcs...i NS list 1.csv:String) [Get-Content], UnauthorizedAccessExceptio
n
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetContentCommand
+ PSComputerName : EABP01IGCHEA01
Cannot find path '\\Ebrfile01\tcs\IT\INFRA IGNIO SOX\vdi NS list 1.csv' because it does not exist.
+ CategoryInfo : ObjectNotFound: (\\Ebrfile01\tcs...i NS list 1.csv:String) [Get-Content], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
+ PSComputerName : EABP01IGCHEA01
【问题讨论】:
标签: powershell powershell-remoting