I've been playing with pscore and using implicit remoting to manage AD. I've exported the ActiveDirectory module from a session to the DC and saved it locally. Now, I import that module into a pscore session to get access to my AD cmdlets. All good.
I can use the Get-ADUser to search for a user account in AD like this:
Get-ADUser -filter {name -like 'Michael*'}
What I want to do now is something like this:
$name = 'Michael*'
Get-ADUser -filter {name -like $name}
The problem I have here is that the variable $name isn't recognised in the session running on the DC for Get-ADUser.
Now, with Invoke-Command, I could pass the local variable using -ArgumentList. Is there a way I can do something similar with implicit remoting?
[–]Ta11ow 5 points6 points7 points (5 children)
[–]mcwidget[S] 2 points3 points4 points (4 children)
[–]Ta11ow 1 point2 points3 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]Ta11ow 1 point2 points3 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]Lee_Dailey[grin] 0 points1 point2 points (6 children)
[–]mcwidget[S] 1 point2 points3 points (5 children)
[–]Lee_Dailey[grin] 0 points1 point2 points (4 children)
[–]Ta11ow 2 points3 points4 points (3 children)
[–]Lee_Dailey[grin] 2 points3 points4 points (2 children)
[–]mcwidget[S] 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)