I know the subject has been seen before but what I am trying to accomplish I haven't been able to find. So here is what I am trying to do:
Have my helpdesk team create a user, once completed I want the following to be completed.
I want the $uac populated from admanager and $Identity populated from admanager. Now I have read that $ARG1 can supply the $uac but what do I need to supply for the $Identity..basically automating my o365 mail creation. If you have a better idea please let me know....this is just the script I put up so my admins could do it without backspacing over the previous creation. Now I want to have it fully automated, and yes I know I will probably have to do a pssession (if I can?).
Thanks for the help in advance.
$uac = Read-Host -prompt "Enter User Account, (User Logon Name ie UserJ)"
$Identity = Read-Host -prompt "Enter Identity, (User Logon Name Pre-Windows 2000, ie Joe_user)"
$EmailAdress = "@cupelectric.mail.onmicrosoft.com"
$RemoteEmailAddress = " $Identity " + " $EmailAdress "
Enable-RemoteMailbox $uac -alias $Identity -RemoteRoutingAddress $RemoteEmailAddress