Let me describe a situation:
I am sitting on a Mac in a remote office and I remotely administer few different small Active Directory domains. My boss ask me to collect some client machine configurations, let it be Manufacturer from all clients in a domain. I can manually log in to the servers using remote access and then run some Powershell commands or a script. For example I could use WMI:
Being already log in as admin I can start Powershell and type(I am not PS guru don't quote me on this:P):
PS C:\> $a = Get-WMIObject -Class Win32_ComputerSystem -Namespace "root\CIMV2" -ComputerName 192.168.1.2 PS C:\> $a.manufacturer Dell
This will work because I am log in as domain admin I have enough privilege to do it and yada yada yada.
What I was wondering about, is there a way so I could authenticate against server from the computer that is outside of the domain and ask server, impersonate it, to do something for me(run WMI commands for example) on domain clients with the privileges of the user I just authenticated with?
Using other words, I love Ruby!, just a concept don't worry about implementation.
Server.impersonate(remote.mydomain.com, credentials) do |server| server.callWMI(:get-wmiobject, 192.168.1.2).manufacturer end
Please note I am not trying to remotely login to server and run some local server scripts.