I am just beginning to use PS Remoting to administer servers but have run into a snag. When I am at the local server command line, I can run a command like
and the prompt returns back a list of my DFS Replication Groups. However, when I am in a remote PSSession to the same server, and run the same command, I receive an error
Value cannot be null. Parameter name: args + CategoryInfo : NotSpecified: (:) [Get-DfsReplicationGroup], ArgumentNullException + FullyQualifiedErrorId : System.ArgumentNullException,Microsoft.DistributedFileSystemReplication.Commands.GetDfsR eplicationGroupCommand
I have tried entering a remote session from not only Windows 10 but also from another Server 2012 R2 machine that has the same roles installed. I have also tried similar approaches using Import-Session, Invoke-Command and have also tried to Import-Module DFSR without success.
It seems like somehow the command is operating differently depending on where it originates. The remote session appears to be working for other commands (I can change directories, create and delete files okay).
I set up my remote PSSession by:
$cred = Get-Credential Enter-PSSession Server1 -Credential $cred
What am I missing in my remote-session setup?