Dec 29 2022 12:35 AM
I'm running a script in exchange management shell, using variables to output a command for creating user email accounts. Write-Host does a nice job showing the command string in the management shell, but of course does not execute it. I've had success using Invoke-Expression followed by a variable representing a string using commandlets such as New-Addresslists and New-Accepteddomain, but when using Invoke-Expression with a variable containing the New-Mailbox commandlet, I get error messages. How do I properly run a variable string from scripts specifically into the exchange management shell to create user email accounts?
Exchange 2019
Dec 29 2022 06:40 AM