Announcement

Collapse
No announcement yet.

Running ActiveDirectory module through a remote powershell session?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running ActiveDirectory module through a remote powershell session?

    HI all im hoping someone can help me with this. I have some powershell code that I wrote and part of it requires the Active Directory Module commands to run. Basically I have a powershell session running on one server and im connected to the remote machine via its fqdn through powershell.

    From there if I do a import-module Activedirectory the results get queried against the domain of the server im logged into instead of having the results passed through the session to the remote server and returned.

    Anybody know how I can get the module results to be passed through the session and return results of the remote environment?

    Thanks all.

  • #2
    Re: Running ActiveDirectory module through a remote powershell session?

    Originally posted by Jscubafbi View Post
    HI all im hoping someone can help me with this. I have some powershell code that I wrote and part of it requires the Active Directory Module commands to run. Basically I have a powershell session running on one server and im connected to the remote machine via its fqdn through powershell.

    From there if I do a import-module Activedirectory the results get queried against the domain of the server im logged into instead of having the results passed through the session to the remote server and returned.

    Anybody know how I can get the module results to be passed through the session and return results of the remote environment?

    Thanks all.
    This looks like it does what you need it to

    http://technet.microsoft.com/en-us/m.../ff720181.aspx

    Comment


    • #3
      Re: Running ActiveDirectory module through a remote powershell session?

      Thanks I will try that, I'm trying to run the following command below on the remote machine and have the data outputted to my local screen:

      Get-ADComputer -identity $_ -Properties ipv4address | select name,dnshostname,ipv4address.

      Comment

      Working...
      X