Access is denied + CategoryInfo : NotSpecified: (:) [Get-ChildItem], UnauthorizedAcc essException + FullyQualifiedE rrorId : System.Unauthor izedAccessExcep tion,Microsoft. PowerShell.Comm ands.GetChildIt emCommand
There are a couple of things that need to be set up for this. You need to make sure the service account that runs the script has remote PowerShell access to the servers (and that they allow remote script execution without signing) and local admin access to the servers.