Power shell

I dont have that PowerShell Module, but i know a server that does…implicit remoting

I dont have that PowerShell Module, but i know a server that does…implicit remoting

This is something I’ve just come across. You can temporarily import PowerShell modules onto your machine as long as you can create a PS session to server/machine that has the module (PS 3 and above) .I.e. if I want to query AD but you don’t have the RSAT tools and related modules installed, you can remote to a DC and then import its modules. An elegant description of this can be found here by the “Hey Scripting Guys”

An example of this is

First we create a variable for our PS Session to a DC

$Session = New-PSSession -ComputerName DC01

Then we import the ActiveDirectory Module from this Session

Import-Module -PSSession $Session -Name ActiveDirectory

Now were ready to use the AD cmdlets. You can remote to almost anything you want and import modules, i.e an RDS server or a SharePoint server.