Add-ExchangeAdministrator and setting the scope to multiple servers with powershell
So you want to add a new Exchange administrator and set the scope to multiple servers, but the management shell won’t allow you to do this?
Here is what happens.
Add-ExchangeAdministrator -identity <user> -role ServerAdmin -scope “server1″,”server2″
Error: Add-ExchangeAdministrator : cannot convert ‘System.Object[]’ to the type ‘System.String’ required by parameter ‘Scope’. Specified method is not supported.
Here’s the solution.
First, you need to build an array that contains the servers in question.
[PS] C:\>$ExServers = “Server1″,”Server2″,”Server3″
[PS] C:\> foreach ($server in $exservers) { Add-ExchangeAdministrator -identity <user> -role ServerAdmin -scope $server }
Now the result is a success, and you will see the appropriate message indicating that the user has been added, and that to fully administer the Exchange server, you should add the user to the local admins group on the server.
Running Get-ExchangeAdministrator will also now show this user in the list with a separate entry for each server.
Now, one more note here. Remember that arrays are only maintained for your specific powershell session. As soon as you close Powershell, you will lose any defined arrays (or variables) unless you have taken actions (for example, modified your powershell profile) to include them.
Thanks for all the nice comments
Just had a chance to go through many comments that have been posted to my blog. Thank you for all the nice comments. As for CRM questions, sorry I am not going to spend much time replying to those. There are now other folks who are more qualified to answer those kind of questions…
Using Silverlight as an excuse to get back on blogging….
What a great way to get back on the blogging scene (I hope it lasts, with all the things that are going on:-)), last week Mix conference in Las Vegas had a great announcement. I personally didn’t attend but a few colleagues went and did a great job of sending up to the minute update. If you are a developer looking for new toys to play with, look no further… Silverlight,which was the star of the show at Mix, is a new client side technology from Microsoft that enables development of cool browser hosted managed apps and videos. Yes, that means that you can use C# to build your apps and get them streamed into in browsers like IE and Firefox. The Silverlight is very light in size and includes some of the Windows Presentation Foundation (A.k.a Avalon) libraries which allow you can build declarative and cool graphical and animation apps that can be hosted in the browser. Check out this demo which is built with Silverlight.
What does Silverlight mean to Software+Service: It provides a nice platform to build Software+Service applications that provide rich user interaction and visuals while talking with a heavy weight service in the cloud. It is like Ajax on steroid. ….. I hope more Microsoft Services take advantage of Silverlight and provide rich browser based interactions and I am sure you will start seeing more Live services provide richer experience using this technology.
As for me, I just downloaded Orcas VS to build some managed apps for some of our Software+Service scenarios. Will try to post what my experience was.
Exchange 2003, ISA and attachment size
I’ve seen a few of these reports recently and worked on one personally, so I thought I would mention this in case anyone else has run into this issue and wasn’t sure how to fix it.
The environment:
ISA server 200x using a Web Publishing Rule to publish OWA on an Exchange 2003 server.
The problem:
When using OWA externally, files larger than 50kb cannot be attached. The symptom is that the attachment screen will simply go blank. If you wait long enough, you may eventually see a timeout error, but that could be a long time (30 minutes or more). Attaching the same file from inside the network works fine.
The apparent solution:
On the Exchange 2003 server, there is a setting within the IIS metabase that needs to be modified. Specifically, the parameter UploadReadAheadSize needs to be set.
Why does this need to be changed?
I don’t know. I’m not an ISA expert, nor am I am IIS expert. The above-mentioned parameter is not set by default, and IIS will use the default schema value of 49152 bytes (48kb). It is worth noting that this parameter apparently does not *always* need to be modified. You should thus only modify this attribute if you are encountering this issue.
This parameter can be modified using adsutil.vbs, which is included by default with IIS, and exists in the inetpub\adminscripts directory. It can also be modified by editing the metabase.xml file in the \winnt\system32\inetsrv directory.
First, verify that no value is set.
C:\inetpub\adminscripts>adsutil get w3svc/UploadReadAheadSize
You should get back a response
The parameter “UploadReadAheadSize” is not set at this node.
To modify this parameter, run the following command
C:\inetpub\adminscripts>adsutil set w3svc/UploadReadAheadSize “<Size in bytes>”
For example, if you want to change this value to 20mb, you would put in “20000000″ as the size.
The response should be
UploadReadAheadSize : (INTEGER) 20000000
Once you make this change, it should be effective immediately.
