I am doing a bulk import, setting or updating attribute6 on 1,000 users in AD.
I'm using the following Exchange commandlet to accomplish this:
[PS] C:\>set-mailbox -Identity email@example.com -CustomAttribute6 firstname.lastname@example.org -WarningAction:SilentlyContinue -ErrorAction SilentlyContinue
The above command is repeated 1000 times and is auto generated.
My problem is that I want to generate a list of errors that I can feed back upstream to resolve errors such as:
- Missing user
- Ambiguous user
- Failure in setting attribute.
What I want to eliminate is the following text:
WARNING: The command completed successfully but no settings of 'company.com/Enterprise/Users/last, first' have been modified.
What I've tried was setting the following
-WarningAction:SilentlyContinue -ErrorAction SilentlyContinue
It seems that either the exchange commandlets don't support this, or perhaps because Exchange Powershell commandlets use "remoting" with stubs may be complicating the error handling.