Powershell v3.0 pipe issue

I found an article that may help.

http://technet.microsoft.com/en-us/library/ee617224.aspx

From the look of your script you are providing the server using the text file. Is it possible the problem is the Windows 2008 server you are running the PowerShell script on is not in the same domain or the user you are logged in as does not have access to the domains where the other servers are members?

snippet from the above article:

-If the Server parameter is specified and the Credential parameter is not specified:
–The domain is set to the domain of the specified server and the cmdlet checks to make sure that the server is in the domain of the
LocalComputer or LoggedOnUser. Then the credentials of the current
logged on user are used to get the domain. An error is returned when
the server is not in the domain of the LocalComputer or LoggedOnUser.

You might try adding the additional parameters for the Get-ADDomain commandlet such as -Identity, -AuthType, and -Credential

Get-ADDomain [-Identity] [-AuthType { |
}] [-Credential ] [-Server ]
[]

Leave a Comment

error code: 521