Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Accessing Entire Active Directory in Drop Down List

$
0
0

Hi Scripting Guy, 

I am basically a Exchange guy :) but I have made a script which takes different input from user and then run a simple command to convert User Mailbox to Linked Mailbox. The actual code is this but i have added GUI functionality as well:

$cred = Get-Credential
$rAccnt=Read-Host "Resource Account?"
$LinkedMAccnt=Read-Host "Linked Master Account?" 
$LinkedDC = Read-Host "Name of Linked DC?"

Set-User $raccnt -LInkedMasterAccount $LinkedMAccnt -LinkedDomainController $LinkedDC -LinkedCredential $cred

Now I want that $LinkedDC should show complete list of DCs in my environment and user can select relevant DC from a drop-down list and that selection be stored in $LinkedDC. 


Hasan


Viewing all articles
Browse latest Browse all 15028

Trending Articles



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