Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Powershell script parameter data type ADAccount.

$
0
0

I am working on a powershell script that accepts the following data type:

[Microsoft.ActiveDirectory.Management.ADAccount]

I cannot seem to figure out how to get it to `Import-Module ActiveDirectory` in order to handle this.

If you import AD before you run the script it works, but they dynamic import in PS 3 doesn't seem to support auto-importing based on data type. And if I try to add `Import-Module Active Directory` at the top of the script it breaks the script.

Any ideas?


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

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