c# - How do I create a "Remote Powershell" server object that can be called by clients? -
in microsoft exchange, it's common clients call remote server object using following commands
$s = new-pssession -configurationname microsoft.exchange -connectionuri http://server01/powershell/ -authentication kerberos import-pssession $s
my understanding no software needed on client, , calls remotely executed on server "server01"
my question is:
assuming have basic powershell object created, how expose in such way can called in similar manner client?
is "remoting" possible arbitrary powershell commandlets, or there set of prerequsites must met?
to add keith has provided, not cmdlets, proxy functions. functions depend on rbac roles belong in exchange. if aren't member of role group that's authorized perform function don't proxy functions cmdlets. if try use them tell command not found. also, don't have use import-pssession. if you're using limited number of cmdlets, once have session established can use invoke-command targeted session run exchange cmdlets , save overhead of doing import load proxy functions available cmdlets local session.
Comments
Post a Comment