In many cases you might be faced with a requirement to perform an unattended SQL Server 2012 installation. To perform SQL Server 2012 installation you need to perform many choices and steps to configure your installation so the question is how to provide all these details during an unattended installation?
There are many methods to perform SQL 2012 unattended installation, one of these methods is to perform image preparation which is greatly enhanced in SQL 2012. This might be a topic for a different post but for this post I wanted to concentrate on another method which is to use a configuration file to configure the installation.
To perform an unattended installation using a configuration file it is simple you just need to write the following command line at a new command prompt.
Setup.exe /ConfigurationFile=SQLConfigurationFile.ini
Simple, right? But the question now is how can I generate this configuration file?
Actually the answer is also very simple.
1. You simply start setup normally by double clicking on Setup.exe
2. Click on installation on the left.
3. Click on “New SQL server stand-alone installation or add features to an existing installation”
4. Go through the normal setup and choose all components you wish to be installed during the unattended installation.
5. On the “Ready to Install” screen you will find the path to the created configuration file as per the screen below
6. Copy the created configuration file and then cancel this installation.
One of the challenges using Windows RTs is to send messages from a store application deployed on one Windows RT tablet (Surface RT in my case) to the other application on another Windows RT tablet. It is a challenge, mainly because it requires push (two-way communications, like WCF duplex channel) messaging and limitations on Windows RT platform (can’t be domain-joined, no queues, you can’t deploy any Win-32 type application, app container etc.).
SignalR, developed by an MS team, is an API (part of ASP.NET framework, starting from .NET 4.5+) that provides simplified real-time and bi-directional communication. So, the relevant keywords would be:
Link to SignalR Server API
Link to SignalR Client API
Link to SignalR Hub API
The solution detailed here demonstrates a case scenario in which tablet users communicate each other by sending messages from the store applications deployed in their Windows RT devices.
Figure#1: POC solution structure
Figure#2: POC solution message flow
As you see, the solution combines Windows Azure cloud services representing SignalR server and 2 Windows store applications representing SignalR clients running on Surface RT devices. Unfortunately, I can’t cover all those things in the picture, so will focus on client API calls for now.
Here are the simplified steps:
_hubConnection = new HubConnection(_url);
_hubProxy = _hubConnection.CreateHubProxy(_hubName);
await _hubConnection.Start();
var joinGroupResponse =
await _hubProxy.Invoke<string>("JoinGroup", _hubConnection.ConnectionId, groupName);
From there, you can send messages from either app. All the messages passed/received along with their trace data are written to textbox (center panel).
Figure#3: HubConnection (Client) class members
Figure#4: Hub (Server) class members
Please note these:
In conclusion, you must consider SignalR API when developing modern applications wherever you need to have push-based functionality. Big thanks goes to the SignalR team, well done in a short time!
When configuring BizTalk Server 2013 RTM on a multi-computer environment you might face multiple issues that are new and did not exist in previous versions of BizTalk server. One of these issues that I faced was when you try to configure the BAM portal after you have configured the BAM Alerts service. Of course you already know that the BAM alerts in BizTalk 2013 is using a new model of Database mail instead of SQL server 2005 notification services (finally) but it seems this caused some problems. In this scenario the configuration failed and when you open the log you see this error.
Error encountered: Could not install BAM Portal, error with regard to “BAM Management Web Service User”
Error thrown: “Attempted to read or write protected memory. This is often an indication that other memory is corrupt.”
When I started looking at this error I started thinking that the BizTalk configuration application is corrupted so I restarted it, with no luck. I then restarted the entire machine with no luck. I then started to look into the log file more carefully and found that there is another error being reported before this one complaining about a problem with one database role called “NSSubscriberAdmin” in the BAM Alert Application database.
I opened this database and I could not find this role defined in it. I started to search the internet for someone who faced this problem with BizTalk 2013 and I found one here. He is suggesting to just add the role “NSSubscriberAdmin” to the BAM Alert Application database. So I did this and it worked.
BUT when I started thinking of what I did, I thought this is wrong since the configuration application did something using this role and this role is not used anywhere in the application so this must hunt me back sometime later. So I opened the SQL management studio and looked at this role and what the configuration application did to it. I found that it actually added the BAM Management Web Service user to this role! So this will be used by this service; what I found also is that there is another role in this database called “BTS_SubscriberAdmin” role (rings any bells ;) ) so I am thinking this is the true role that the configuration application should have used. So what I did is that I added the “BAM Management Web Service User” to this role “BTS_SubscriberAdmin”. I hope that this is enough to make the solution work with no problems. J
Happy BizTalking ;)
When configuring BizTalk Server 2013 RTM on a multi-computer environment you might face multiple issues that are new and did not exist in previous versions of BizTalk server. One of these issues that I faced was when the BizTalk Server and the database server are two separate servers. I was trying to configure only BAM tools and without the configuration of the BAM alerts. Of course you already know that the BAM alerts in BizTalk 2013 is using a new model of Database mail instead of SQL server 2005 notification services (finally) but it seems this caused some problems. In this scenario the configuration failed and when you open the log you see this error.
[Info] BAMTools Determining version of Microsoft SQL Server installed on server.
[Error] BAMTools Error configuring
Error determining version of Microsoft SQL Server installed on server. (Microsoft.BizTalk.Bam.CfgExtHelper.Utility)
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
The system cannot find the file specified ()
This is a known and reported issue in BizTalk server 2013 and there are two workarounds for this issue:
1- Install SQL Server 2005 Notification services on the BizTalk server machine. (again L) I personally do not like this option as you are installing something you are not using.
2- Configure the SQL server 2012 database mail and configure both the BAM tools and BAM alerts at the same time. This is a good option if you are going to use BAM alerts but if you are not going to use it then you are configuring a feature that you will not be using.
The official and recommended solution for this is to install the already available Hot Fix for this issue. This hot fix would be automatically installed on the BizTalk server if it has internet access, but like my case where the servers does not have internet access I had to manually download and install it. Please find the download for this hot fix here.
http://support.microsoft.com/kb/2838133
In part 1 we covered the deployments steps for Exchange 2013, in Part 2 of this series we covered Exchange 2013 configurations and testing, in part 3 started our migration process. In this final post we will walk through the final steps in migration, then remove our legacy server.
This phase is very well documented online, accordingly we will walk through the steps with minimum explanations, to understand the whole processes check this Link.
Before you begin Download all four of the Microsoft Exchange 2013 public folder migration scripts.
Open Exchange 2007 Management Shell and run the following commands:
Get-PublicFolder -Recurse | Export-CliXML C:\PFMigration\Legacy_PFStructure.xml
Get-PublicFolderStatistics | Export-CliXML C:\PFMigration\Legacy_PFStatistics.xml
Get-PublicFolder -Recurse | Get-PublicFolderClientPermission | Select-Object Identity,User -ExpandProperty AccessRights | Export-CliXML C:\PFMigration\Legacy_PFPerms.xml
If the name of a public folder contains a backslash \, the public folders will be created in the parent public folder when migration occurs. You have to rename any public folders that have a backslash in the name.
To get Public folders with backslash, run the following command:
Get-PublicFolderDatabase | ForEach {Get-PublicFolderStatistics -Server $_.Server | Where {$_.Name -like "*\*"}}
Change the public folder name as shown below:
Set-PublicFolder -Identity 000000001A447390AA6611CD9BC800AA002FC45A0300D13A87259D34A142BB480F3E89AA82BF00004FD5389E0000 -name "MCS TF2"
Get-OrganizationConfig | Format-List PublicFoldersLockedforMigration, PublicFolderMigrationComplete
On Exchange 2007 run the below script to create the folder name-to-folder size mapping file, the file will create the folders and its sizes
.\Export-PublicFolderStatistics.ps1 PFStat.csv e12-01
Copy this file to Exchange 2013 and run the below script to create the second CSV, which will let you know how many mailboxes will be required for your folders based on the mailbox you will set as show below:
.\PublicFolderToMailboxMapGenerator.ps1 1GB PFStat.csv FolderToMailbox.csv
As I have a very small PF only one Mailbox is required as below:
New-Mailbox -PublicFolder Mailbox1 –Database DB01 –HoldForMigration: $true
New-PublicFolderMigrationRequest -SourceDatabase (Get-PublicFolderDatabase -Server e12-01.contoso.local) -CSVData (Get-Content FolderToMailbox.csv -Encoding Byte)
Once the migration reached the AutoSuspended state as shown below, proceed to the next steps, otherwise you must wait as this may take some time based on your PF size.
Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics
Set-OrganizationConfig -PublicFoldersLockedForMigration:$true
Set-PublicFolderMigrationRequest -Identity \PublicFolderMigration -PreventCompletion:$false
Resume-PublicFolderMigrationRequest -Identity \PublicFolderMigration
I will configure a test user to use the new PF using the following command:
Set-Mailbox -Identity mohsaeed -DefaultPublicFolderMailbox mailbox1
Open the test user mailbox and run some tests: Create new post, view old posts, check permissions
If all tests passed successful proceed to next step.
Get-Mailbox -PublicFolder | Set-Mailbox -PublicFolder -IsExcludedFromServingHierarchy $false
Set-OrganizationConfig -PublicFolderMigrationComplete:$true
Remove Mailbox Databases, open Exchange 2007 management shell, and run the following command:
Get-MailboxDatabase | Remove-MailboxDatabase
Remove your PF Databse using guidelines in this link.
Open cmd, navigate to bin directory and run the below command:
Setup.com /mode:uninstall
Regards,
Mohammad
In part 1 we covered the deployments steps for Exchange 2013, in Part 2 of this series we covered Exchange 2013 configurations and testing, in this part we will start our migration. Make sure to start these configuration outside business hours, also plan a proper downtime to complete these steps and test them.
Open Exchange 2007 management shell and run the following commands.
Set-OwaVirtualDirectory -Identity "e12-01\OWA (Default Web Site)" -ExternalUrl https://legacy.contoso.com/owa
Set-OabVirtualDirectory -Identity "e12-01\OAB (Default Web Site)" -InternalUrl https://legacy.contoso.com/oab -ExternalUrl https://legacy.contoso.com/oab
Set-ActiveSyncVirtualDirectory –Identity “e12-01\Microsoft-Server-ActiveSync (Default Web Site)” –ExternalUrl $Null –InternalUrl https://legacy.contoso.com/Microsoft-Server-ActiveSync
Set-WebServicesVirtualDirectory –Identity “e12-01\EWS (Default Web Site)” -InternalUrl https://legacy.contoso.com/ews/exchange.asmx –ExternalUrl https://legacy.contoso.com/EWS/Exchange.asmx
Set-UMVirtualDirectory -Identity "UnifiedMessaging (Default Web Site)" –InternalUrl https://legacy.contoso.com/UnifiedMessaging/services.asmx –ExternalUrl https://legacy.contoso.com/UnifiedMessaging/services.asmx
Set-OutlookAnywhere -Identity "E12-01\Rpc (Default WebSite)" -IISAuthenticationMethods Basic,Ntlm
Create/update your TMG publish rules
For Exchange 2007 update your publish rules to accept connections for Legacy name space:
Follow the steps in this link to publish Exchange 2013.
Update your DNS records as follows
Record/Type
Comment
mail.contoso.com
Point to Exchange 2013 server
autodiscover.contoso.com
Legacy.contoso.com
New record points to Exchange 2007 Server
Record
Point to TMG Listener
New record Point to TMG Listener
Apply all your test scenarios for both internal and External client types; once again you can use Microsoft Remote Connectivity Analyzer
Once you complete your tests successfully, its time to start moving mailboxes. you can do this using EAC or Shell.
New-MoveRequest -Identity 'mohsaeed@contoso.com' -TargetDatabase "DB01"
You can create Batch moves as described in this link. Once you complete your mailboxes migration let us move to the final steps in this migration process (PF Migration and Exchange 2007 Decommissioning).
In Part 1 of this post we went through the steps required to deploy Exchange 2013, in this part we will start by the required configurations on Exchange 2013 to establish our coexistence and then test it.
The first step in our configurations will be certificate. By default Exchange is installed with self-signed certificate, we need to replace this certificate to include the correct names (legacy is required as I will use the same certificate on Exchange 2007 and TMG as well):
Hostname
Description
FQDN used by all external and internal clients
FQDN for the autodiscover service
FQDN used by all external and internal clients for Exchange 2007
To create certificate request open exchange management shell and run the following command:
New-ExchangeCertificate -FriendlyName 'Contoso Exchange 15 Certificate' -GenerateRequest -PrivateKeyExportable $true -KeySize '2048' -SubjectName 'C=EG,S="Cairo",L="Cairo",O="Contoso",OU="IT",CN=mail.contoso.com' -DomainName 'mail.contoso.com','autodiscover.contoso.com' ,'legacy.contoso.com' | out-file c:\sw\e15_csr.txt
Submit your certificate request to be signed by your CA, then use the following command to import the certificate:
Import-ExchangeCertificate -filename c:\sw\certnew.cer
Configure the Exchange server to use this certificate using the following command:
Enable-ExchangeCertificate -Thumbprint A826389C71ED5870137B866F01192D47F69CE526 -Services IIS,POP,IMAP
Export the certificate with the private key and import it on Exchange 2007 CAS servers using the same steps.
To use the Exchange certificate wizards, follow this link.
To configure Exchange 2013 virtual directories open Exchange 2013 management shell and follow the below steps:
Set-OwaVirtualDirectory -Identity "e15-01\OWA (Default Web Site)" -ExternalUrl https://mail.contoso.com/owa -LogonFormat username -DefaultDomain contoso.local
Set-EcpVirtualDirectory -Identity "e15-01\ECP (Default Web Site)" -ExternalUrl https://mail.contoso.com/ecp
Set-OabVirtualDirectory -Identity "e15-01\OAB (Default Web Site)" -InternalUrl https://mail.contoso.com/oab -ExternalUrl https://mail.contoso.com/oab
Set-ActiveSyncVirtualDirectory –Identity “e15-01\Microsoft-Server-ActiveSync (Default Web Site)” –ExternalUrl https://mail.contoso.com/Microsoft-Server-ActiveSync –InternalUrl https://mail.contoso.com/Microsoft-Server-ActiveSync
Set-WebServicesVirtualDirectory –Identity “e15-01\EWS (Default Web Site)” -InternalUrl https://mail.contoso.com/ews/exchange.asmx –ExternalUrl https://mail.contoso.com/EWS/Exchange.asmx
Set-ClientAccessServer -Identity e15-01 -AutoDiscoverServiceInternalUri https://autodiscover.contoso.com/autodiscover/autodiscover.xml
Set-OutlookAnywhere -Identity "E15-01\Rpc (Default Web Site)" -InternalHostname mail.contoso.com -ExternalHostname mail.contoso.com -InternalClientAuthenticationMethod Ntlm -ExternalClientAuthenticationMethod Basic -ExternalClientsRequireSsl $True -InternalClientsRequireSsl $true
Change the default OAB on Exchange 2013 databases, to do so open Exchange 2013 Management Shell and run the following command:
Get-MailboxDatabase | Set-MailboxDatabase -OfflineAddressBook "\Default Offline Address Book (Ex2013)"
In my case all I need is one connector to receive mails from TMG (or SMTP GW), to create this connector use the below command:
New-ReceiveConnector -Name Inbound -Usage Custom -Bindings 192.168.2.11:24 -RemoteIPRanges 192.168.2.20
All you have to do is to add Exchange 2013 server to the existing send connector as shown below:
Set-SendConnector -Identity Outbound -SourceTransportServers E12-01,E15-01
Transport rules are not migrated to exchange 2013; accordingly you must export and import them as below:
Open Exchange 2007 management shell and run the following command:
Export-TransportRuleCollection -FileName "c:\ExportedRules.xml"
Copy the ExportedRules.xml file to Exchange 2013, open Exchange 2013 management shell & run the following command:
[Byte[]]$Data = Get-Content -Path "C:\TransportRules\ExportedRules.xml" -Encoding Byte -ReadCount 0 Import-TransportRuleCollection -FileData $Data
For additional readings check this Link
Now its time to create your own test scenarios and apply them before starting your migration.
For me I have a small test scenarios as below:
Create a test user on E15 and apply the following tests from a machine with hosts file that point to Exchange 2013 server.
Test mail flow by sending couple of mails to Exchange 2007 users, outbound and Inbound mail flow and analyze headers using the same tool.
You can add your 3rd party tools configurations and testing, and once you complete all tests successfully, continue to Part 3 and let us start the migration process.
In this article series we will explain and go through all the steps to migrate from Exchange 2007 to Exchange 2013.
The series consists of four Parts:
Exchange is always considered as a mission critical service; accordingly and to assure a smooth upgrade process without any interruption to mail services, you have to spend some time on planning your deployment and upgrade. A good start can be through the below links:
Exchange 2013 TechEd Sessions and Labs which includes session about Exchange 2013 high availability, virtualization, managed availability, retention, site mailboxes, modern public folders, transport, unified messaging, Outlook Web App, EWS, and the most important one in case you will be doing a migration is Exchange Server 2013 On-Premises Upgrade and Coexistence
Sizing Exchange 2013 Deployments by the Exchange Team Blog
Exchange Server 2013 Deployment Assistant
In my Lab I have Exchange 2007 server holding CAS/HUB/MBX roles with a few users on it, published to the internet using TMG (with no pre-authentication), TMG acting as my SMTP GW as well, our goal in these series of posts to deploy a single Exchange 2013 server with all server roles on it, migrate all users and services to the new server, and finally decommission our legacy server.
From a domain joined machine in the same AD domain, & Site of your Schema master (in my case I have single forest single domain and single AD site); with Microsoft .NET Framework 4.5 and Windows Management Framework 3.0 installed, open PowerShell and run the following commands:
Install-WindowsFeature RSAT-ADDS
.\setup /PrepareAD /OrganizationName: contoso /IAcceptExchangeServerLicenseTerms
To Validate your AD preparation open your Schema partition using ADSI and make sure that ms-Exch-Schema-Version-Pt is showing the correct value as shown below:
Open you Active Directory Users and Computers console, you should be able to see the below groups created:
For more validation steps, and information about AD preparation requirements visit this link.
Force AD replication and make sure its successful, then let us move to the next steps.
To Install OS prerequisites on Windows Server 2012 open PowerShell and run the following command:
Install-WindowsFeature AS-HTTP-Activation, Desktop-Experience, NET-Framework-45-Features, RPC-over-HTTP-proxy, RSAT-Clustering, RSAT-Clustering-CmdInterface, RSAT-Clustering-Mgmt, RSAT-Clustering-PowerShell, Web-Mgmt-Console, WAS-Process-Model, Web-Asp-Net45, Web-Basic-Auth, Web-Client-Auth, Web-Digest-Auth, Web-Dir-Browsing, Web-Dyn-Compression, Web-Http-Errors, Web-Http-Logging, Web-Http-Redirect, Web-Http-Tracing, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-Mgmt-Console, Web-Mgmt-Service, Web-Net-Ext45, Web-Request-Monitor, Web-Server, Web-Stat-Compression, Web-Static-Content, Web-Windows-Auth, Web-WMI, Windows-Identity-Foundation
After restart install the below components in the same order:
In case you have a different scenario (such as separate MBX & CAS roles) follow the steps in this link.
To install MBX/CAS server (in my case I will change the first DB name and directory; this is optional) open PowerShell and run the following command:
.\setup /m:Install /Roles:ca,mb,mt /IAcceptExchangeServerLicenseTerms /InstallWindowsComponents /DBFilePath:"C:\DB01\DB01.edb" /LogFolderPath:"C:\DB01\Logs" /MdbName:"DB01"
You can follow the steps in the below links for different scenarios, or in case you prefer to use the Exchange Setup Wizard:
Install Exchange 2013 Using Unattended Mode
Install Exchange 2013 Using the Setup Wizard
After you complete installation successful let us move to the next steps through part 2 of this series.