Hi Everyone,
I’m hoping someone can help me with what may be a simple issue for an expert. I have a CSV file of users that I am using to create remote mailboxes on my hybrid Exchange server that will then sync to Office 365 via ADConnect. I am doing this via remoting into my Exchange box via this command…
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://hybrid.exchange.com/PowerShell/ -Authentication Kerberos -Credential $UserCredential
Then…
Import-PSSession $Session -DisableNameChecking
OK no problems there, I get connected. Once at the prompt, I am running this command to create the mailboxes…
Import-CSV -Path “C:\users\nsaenz\Documents\FWtest.csv” | ForEach-Object {New-RemoteMailbox -UserPrincipalName $.UserPrincipalName -Name $.Name -OnPremisesOrganizationalUnit $_.OnPremiseOrganizationalUnit }
It runs fine but for each user in my CSV file (there will be 100 or so), I get this warning for each mailbox…
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
WARNING: A script or application on the remote computer HYBRID.EXCHANGE.COM is sending a prompt
request. When you are prompted, enter sensitive information, such as credentials or passwords, only if
you trust the remote computer and the application or script that is requesting the data.
Is there a way to bypass this so that I don’t have to enter my password 100 times?
Thanks as always in advance.
Nelson