Running Import-Module Active Directory for Script On Computer that has RSAT through Shortcut

1.1k Views Asked by At

I currently have a script that opens up a GUI that will run a Get-ADUser cmdlet. It opens through a shortcut where I provide an -executionpolicy bypass. It is currently working on my computer, but not anyone elses. The GUI will come up and run, but will not search. I'm thinking it is because it has not ever loaded Import-Module ActiveDirectory. Putting it in the beginning of script does not work. When I put it as a -command Import-ActiveDirectory into my shortcut it is still not working. Any idea why this is not working on other computers?

1

There are 1 best solutions below

10
On BEST ANSWER

Unclear with your question, Is RSAT installed on the machine that is running the script?

Does the User who is running the script on there machine have credentials to read Active Directory?

Are you able to share any of the script ?

Are you able to run Import-Module ActiveDirectory outside of the script on the other computers? if so, what is the error?