mailboxes that have no mailbox plan assigned yet. The following SQL statement will 'upgrade' the user data to work with the new exchange 2010 SP2 provider. Ensure you replace the variables with values that matches your environment. DECLARE @NetBIOSDomain nvarchar(20) DECLARE @ExchangeOrgRoot nvarchar(256) SET @NetBIOSDomain = 'MYDOMAIN' SET @ExchangeOrgRoot = 'CN=First Organization,CN=Microsoft Exchange,CN=Services, CN=Configuration,DC=mydomain,DC=local' UPDATE ExchangeAccounts SET SamAccountName = @NetBIOSDomain+'\'+AccountName WHERE AccountID IN (SELECT AccountID FROM ExchangeAccounts WHERE AccountType IN (3,7) AND SamAccountName = '') INSERT INTO ServiceItemProperties (ItemID, PropertyName, PropertyValue) (SELECT SP.ItemID, 'AddressBookPolicy', PV = 'CN='+SP.PropertyValue+' Address Policy,CN=AddressBook Mailbox Policies,' + @ExchangeOrgRoot FROM ServiceItemProperties AS SP WHERE (PropertyName = 'OrganizationID') AND (ItemID IN (SELECT ItemID FROM ServiceItemProperties AS ServiceItemProperties_1 WHERE (PropertyName = 'GlobalAddressList') AND (PropertyValue <> '')))) UPDATE SP SET PropertyValue='CN='+SP2.PropertyValue+' Rooms,CN=All Address Lists ,CN=Address Lists Container,'+@ExchangeOrgRoot FROM ServiceItemProperties AS SP JOIN ServiceItemProperties AS SP2 ON SP.ItemID = SP2.ItemID AND SP.PropertyName='RoomsAddressList' WHERE (SP2.PropertyName = 'OrganizationID') AND (SP2.ItemID IN (SELECT ItemID FROM ServiceItemProperties AS ServiceItemProperties_1 WHERE (PropertyName = 'GlobalAddressList') AND (PropertyValue <> '')))
6 lines
392 B
Batchfile
6 lines
392 B
Batchfile
SET WSDL="C:\Program Files (x86)\Microsoft WSE\v3.0\Tools\WseWsdl3.exe"
|
|
SET WSE_CLEAN=..\Tools\WseClean.exe
|
|
SET SERVER_URL=http://localhost:9005
|
|
|
|
%WSDL% %SERVER_URL%/esExchangeServer.asmx /out:.\WebsitePanel.EnterpriseServer.Client\ExchangeServerProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient
|
|
%WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\ExchangeServerProxy.cs
|