我目前以DomainA \ blevitt身份登录。但是,只有DomainB \ blevitt才能访问SSRS。如果我运行下面的脚本......
$ssrsCredential = Get-Credential
Connect-RsReportServer -ReportServerUri $reportServerUrl -Credential $ssrsCredential -Verbose
Write-RsCatalogItem -ReportServerUri $reportServerUrl -RsFolder "/$folder" -Path '.\Time Cost vs Tracked.rdl' -Overwrite -Verbose
...并在我收到的Get-Credential提示中指定DomainB \ blevitt:
授予用户“DomainA \ blevitt”的权限不足 执行此操作
请注意,它使用了我当前的powershell DomainA帐户,而不是我传递给Get-Credential的DomainB凭据。我还尝试将DomainB凭证直接传递给Write-RsCatalogItem的-Credential arg。
我知道我可以以不同的用户身份开始我的powershell会话,但我仍然想知道为什么-Credentail param似乎没有做任何事情。