Quantcast
Viewing all articles
Browse latest Browse all 7132

WINRM remote server Variable

hi 

 use WINRM , and create a session to my AD server like this :

$ADsession = New-PSSession -computerName dc01
Invoke-command { import-module activedirectory } -session $ADsession

import-pssession $ADsession  -CommandName New-ADUser   -AllowClobber 

When I run :  New-ADUser existuser  -ErrorVariable ADError

I can't get the value of $ADError on my PC console



Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>