Set-IpamDatabase
Set-IpamDatabase
Modifies settings that IPAM uses to connect to the IPAM database.
Syntax
Parameter Set: SetDatabaseConfig0
Set-IpamDatabase [-DatabaseServer] <String> [-DatabaseName] <String> [-DatabasePort] <UInt16> -DatabaseAuthType <AuthType> [-AsJob] [-CimSession <CimSession[]> ] [-DatabaseCredential <PSCredential> ] [-Force] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-IpamDatabase cmdlet modifies settings that IP Address Management (IPAM) uses to connect to the IPAM database hosted on a computer that runs Microsoft SQL Server.
Verify that you can reach the database server from the IPAM server. Specify whether to connect to the destination server by using the account for the computer that hosts the IPAM server or by using a SQL Server database account. If you specify the IPAM server account, verify that account has necessary permissions.
Use the Get-IpamDatabase cmdlet to view database configuration settings.
You can specify any port to connect to the database server. We recommend you use the default port, 1433, to connect to Microsoft SQL Server.
Parameters
-AsJob
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-CimSession<CimSession[]>
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Aliases |
Session |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DatabaseAuthType<AuthType>
Specifies which type of authentication to use to connect to the computer that runs SQL Server. The acceptable values for this parameter are:
-- SQL. Use the database account. Specify this credential by using the DatabaseCredential parameter.
-- Windows. Use the account for the computer that runs the IPAM server.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DatabaseCredential<PSCredential>
Specifies credentials, as a PSCredential object, for the computer that runs SQL Server. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential
.
Specify this parameter if you specified a value of SQL for the DatabaseAuthType parameter.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DatabaseName<String>
Specifies the name of a SQL Server database. The IPAM server connects to this database.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DatabasePort<UInt16>
Specifies the port that the IPAM server uses to connect to the database server.
Aliases |
none |
Required? |
true |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DatabaseServer<String>
Specifies the fully qualified domain name (FQDN) or IP address of the database server. The IPAM server connects to this server.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ThrottleLimit<Int32>
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0
is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
IpamDatabase
Represents the datastore for an IPAM server.
Examples
Example 1: Connect to an external database
This example configures the IPAM server to connect to an external database. The cmdlet does not move any data from the existing WID database or create the new database. Configure all access settings manually on the database server. The example uses Windows as the database authentication type.
The first command command uses the Get-IpamDatabase cmdlet to display the configuration settings of the database.
PS C:\> Get-IpamDatabase
The second command sets the database configuration. The command includes the database name and database server name. The cmdlet prompts you before it continues.
PS C:\> Set-IpamDatabase -DatabaseServer "ContosoDB04" -DatabaseName "IpamData01" -DatabasePort 1433 -DatabaseAuthType Windows
The last command repeats the first command, displaying the revised configuration information.
PS C:\> Get-IpamDatabase