This section describes the Update-MDTDatabaseSchema Windows PowerShell cmdlet. Run this cmdlet from a Windows PowerShell console that has the MDT PowerShell snap-in loaded. For more information on how to start a Windows PowerShell console that has the MDT PowerShell snap-in loaded, see Loading the MDT Windows PowerShell Snap-In.
Syntax
Update-MDTDatabaseSchema -SQLServer <String> [-Instance <String>] [-Port <String>] [-Netlib <String>] -Database <String> [-SQLShare <String>] [<CommonParameters>]
Description
This cmdlet updates an existing MDT DB database to the latest version of the MDT DB database schema. Each deployment share can be associated with only one MDT DB database.
This cmdlet is automatically called when a deployment share is being upgraded, such as when running the Restore-MDTPersistentDrive cmdlet with the Force parameter and the Update-MDTDeploymentShare cmdlet.
Parameters
This subsection provides information about the various parameters that can be used with the Upgrade-MDTDatabaseSchema cmdlet.
-SQLServer <String>
This parameter specifies the name of the computer running SQL Server where the MDT DB database will be upgraded.
Parameter |
Value |
Required? |
True |
Position? |
Named |
Default value |
– |
Accept pipeline input? |
False |
Accept wildcard characters? |
False |
-Instance <String>
This parameter specifies the SQL Server instance on which the MDT DB database to be upgraded exists. If this parameter is omitted, then the MDT DB database is assumed to be in the default SQL Server instance.
Note The SQL Browser service must be running on the computer running SQL Server for the cmdlet to locate the instance specified in this parameter.
Parameter |
Value |
Required? |
False |
Position? |
Named |
Default value |
– |
Accept pipeline input? |
False |
Accept wildcard characters? |
False |
-Port <String>
This parameter specifies the TCP port to be used in communication with the SQL Server instance specified in the SQLServer parameter. The default port that SQL Server uses is 1433. Specify this parameter when SQL Server is configured to use a port other than the default value. The value of this parameter must match the port configured for SQL Server.
Parameter |
Value |
Required? |
False |
Position? |
Named |
Default value |
– |
Accept pipeline input? |
False |
Accept wildcard characters? |
False |
-Netlib <String>
This parameter specifies the SQL network library that is used in communication with the SQL Server instance specified in the SQLServer parameter. The parameter can be set to one of the following values:
· DBNMPNTW, which is used to specify named pipes communication
· DBSMSOCN, which is used to specify TCP/IP sockets communication
If this parameter is not provided, the named pipes SQL network library (DBNMPNTW) is used.
Note The Deployment Workbench does not provide the option for configuring the SQL network library. The Deployment Workbench always uses named pipes communication. However, the SQL network library can be configured in the CustomSettings.ini file.
Parameter |
Value |
Required? |
False |
Position? |
Named |
Default value |
– |
Accept pipeline input? |
False |
Accept wildcard characters? |
False |
-Database <String>
This parameter specifies the name of the database to be upgraded in the SQL Server instance specified in the Instance parameter on the SQL Server instance specified in the SQLServer parameter.
Parameter |
Value |
Required? |
True |
Position? |
Named |
Default value |
– |
Accept pipeline input? |
False |
Accept wildcard characters? |
False |
<CommonParameters>
This cmdlet supports the following common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. For more information, see the topic, “about_CommonParameters,” which you can access by typing the following command, and then pressing ENTER:
Get-Help about_CommonParameters
Outputs
This cmdlet outputs a PSObject type object for the MDT database that was upgraded. This cmdlet also outputs a String type data if the Verbose common parameter is included.
Example 1
Update-MDTDatabaseSchema –SQLServer "WDG‑SQL‑01" ‑Database "MDTDB"
Description
This example updates the schema for an MDT database named MDTDB in the default SQL Server instance on a computer named WDG-SQL-01. The connection will be made to the SQL Server instance using the default TCP port and the Named Pipes protocol.
Example 2
Update-MDTDatabaseSchema –SQLServer "WDG‑SQL‑01" –Instance "MDTInstance" -Port "6333" ‑Database "MDTDB"
Description
This example updates the schema for an MDT database named MDTDB in the SQL Server instance named MDTInstance on a computer named WDG-SQL-01. The connection will be made to the SQL Server using TCP port 6333 and the Named Pipes protocol.
Related Topics