I ran into trouble!
I created a Form meant for end-users, which is searching the AD for print queues and the user can also connect a shared printer to his PC.
After finishing the tool, I was very proud that it was running flawless.
I am using at the beginning the command: Import-Module ActiveDirectory in order to have access to Get-ADObject cmdlet.
But when I copied the tool to another PC: SURPRISE! I have been struck by reality! The ActiveDirectory Module comes only with the RSAT tools, which makes my tool useless on the PCs of endusers.
Now my question: is there any way to import the AD Module or maybe only the Get-AdObject cmdlet to the PCs of the end-users? It is impossible to install RSAT on all PCs only to run this little tool.
Connecting remotely to another PSSession is also not an option, since the connection might be very slow to the other PC.
I saw that the Powershell Modules are stored under C:\Windows\System32\WindowsPowerShell\v1.0\Modules, but simply copying them to the other PC is not helping. I am still not able to import the AD Module
Any other ideas how to make the Get-ADObject cmdlet available to end-user PCs?