Hi all, I am having a problem with scripting and no ammount of google-ing has come up with a solution as yet. I have a script which emails me a list of Exchange mailboxes and their sizes. The script runs perfectly fine if I login to the server with the admin account, it is based on http://msdn2.microsoft.com/en-us/library/aa144767.aspx with a bit of emailing code wrapped around it. However when I install the script using the AT API for Scheduled Tasks, it doesnt seem to return any instances of Exchange_Mailbox. The script runs and emails me a blank log. How do I get it working under the "NT AUTHORITY\SYSTEM" account (this is what runs under the schduled tasks)? It is a standard Exchange 2003 setup running on Windows 2003 SBS. Thanks Chris
To execute a query against the Exchange_Mailbox WMI class a user must have at least delegated View Only Admin rights. What I would suggest you do is instead of trying to run the job under the system context create a user for this purpose then delegate it view only admin rights and then set the job to run as this account. (you need to be carefull of your password expirations with this account) Cheers Glen wrote in message news:1173709768.834735.123280@c51g2000cwc.googlegroups.com... > Hi all, > > I am having a problem with scripting and no ammount of google-ing has > come up with a solution as yet. I have a script which emails me a list > of Exchange mailboxes and their sizes. The script runs perfectly fine > if I login to the server with the admin account, it is based on > http://msdn2.microsoft.com/en-us/library/aa144767.aspx > with a bit of emailing code wrapped around it. > > However when I install the script using the AT API for Scheduled > Tasks, it doesnt seem to return any instances of Exchange_Mailbox. The > script runs and emails me a blank log. > > How do I get it working under the "NT AUTHORITY\SYSTEM" account (this > is what runs under the schduled tasks)? > > It is a standard Exchange 2003 setup running on Windows 2003 SBS. > > Thanks > Chris >
Thanks Glen, I thought it would have something to do with permissions. Unfortunatly I need the scheduled task to be run under the system context as this job ia created and deleted automatically by another script. The script also needs to be able to run regardless of domain / server / user names. How do I delegate View only admin rights to the system account? Thanks Chris On 12 Mar, 22:12, "Glen Scales [MVP]" wrote: > To execute a query against the Exchange_Mailbox WMI class a user must have > at least delegated View Only Admin rights. What I would suggest you do is > instead of trying to run the job under the system context create a user for > this purpose then delegate it view only admin rights and then set the job to > run as this account. (you need to be carefull of your password expirations > with this account) > > Cheers > Glen > > wrote in message > > news:1173709768.834735.123280@c51g2000cwc.googlegroups.com... > > > Hi all, > > > I am having a problem with scripting and no ammount of google-ing has > > come up with a solution as yet. I have a script which emails me a list > > of Exchange mailboxes and their sizes. The script runs perfectly fine > > if I login to the server with the admin account, it is based on > >http://msdn2.microsoft.com/en-us/library/aa144767.aspx > > with a bit of emailing code wrapped around it. > > > However when I install the script using the AT API for Scheduled > > Tasks, it doesnt seem to return any instances of Exchange_Mailbox. The > > script runs and emails me a blank log. > > > How do I get it working under the "NT AUTHORITY\SYSTEM" account (this > > is what runs under the schduled tasks)? > > > It is a standard Exchange 2003 setup running on Windows 2003 SBS. > > > Thanks > > Chris
Same way as normal using Exchange System Manager right click the top of the organization and select delegate from the context menu have a look at the walk through on http://www.msexchange.org/articles/Understanding-Exchange-Access-Control-Administrative-Delegation.html Cheers Glen wrote in message news:1173777767.814554.235990@s48g2000cws.googlegroups.com... > Thanks Glen, I thought it would have something to do with permissions. > Unfortunatly I need the scheduled task to be run under the system > context as this job ia created and deleted automatically by another > script. The script also needs to be able to run regardless of domain / > server / user names. How do I delegate View only admin rights to the > system account? > > Thanks > > Chris > > > On 12 Mar, 22:12, "Glen Scales [MVP]" > wrote: >> To execute a query against the Exchange_Mailbox WMI class a user must >> have >> at least delegated View Only Admin rights. What I would suggest you do is >> instead of trying to run the job under the system context create a user >> for >> this purpose then delegate it view only admin rights and then set the job >> to >> run as this account. (you need to be carefull of your password >> expirations >> with this account) >> >> Cheers >> Glen >> >> wrote in message >> >> news:1173709768.834735.123280@c51g2000cwc.googlegroups.com... >> >> > Hi all, >> >> > I am having a problem with scripting and no ammount of google-ing has >> > come up with a solution as yet. I have a script which emails me a list >> > of Exchange mailboxes and their sizes. The script runs perfectly fine >> > if I login to the server with the admin account, it is based on >> >http://msdn2.microsoft.com/en-us/library/aa144767.aspx >> > with a bit of emailing code wrapped around it. >> >> > However when I install the script using the AT API for Scheduled >> > Tasks, it doesnt seem to return any instances of Exchange_Mailbox. The >> > script runs and emails me a blank log. >> >> > How do I get it working under the "NT AUTHORITY\SYSTEM" account (this >> > is what runs under the schduled tasks)? >> >> > It is a standard Exchange 2003 setup running on Windows 2003 SBS. >> >> > Thanks >> > Chris > >