Add-QLRSqlRegServer
From PowerGUI Wiki
Registers a new SQL Server instance.
Contents |
Syntax
Add-QLRSqlRegServer [-Name] <String> [[-LoginMode] [<AuthMode>]] [[-Login] [<String>]] [[-Password] [<String>]] [-Group [<String>]] [-ConfigFile [<String>]] [<CommonParameters>]
Detailed Description
The Add-QLRSqlRegServer cmdlet registers a new SQL Server instance and adds its connection parameters into the configuration file. You can use this connection parameters in the future to connect to the registered SQL Server by setting the connection mode to Predefined.
Related Commands
Parameters
| Name | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|
| Name | The name of the SQL Server instance. | true | false | |
| LoginMode | The connection mode. Can be one of the following:
- Windows, the Windows authentication will be used - SQLServer, the SQL Server authentication will be used | false | false | |
| Login | The login name to connect to the SQL Server. If LoginMode is set to "Windows", this parameter is ignored. | false | false | |
| Password | The password to connect to the SQL Server. If LoginMode is set to "Windows", this parameter is ignored. | false | false | |
| Group | The group where to register the SQL Server. Groups are used only for better filtering and sorting of registered servers. | false | false | |
| ConfigFile | The configuration file name. The default configuration file is located at <%LocalAppData%>\Quest Software\Log Reader for SQL Server\QuestLogReader.config. You can use another configuration file to save your settings. | false | false |
Return Values
Quest.LogReader.SqlServer.Wrappers.ServerWrapper
Examples
EXAMPLE 1
Add-QLRSqlRegServer MyServer Windows
This command registers the MyServer SQL Server using Windows authentication.
EXAMPLE 2
Add-QLRSqlRegServer MyServer SQLServer sa pass -Group MyServers -ConfigFile C:\LRConfig.config
This command registers the MyServer SQL Server using SQL Server authentication. The login name and password are "sa" and "pass". The new server will be registered in the MyServers group and its configuration will be saved in the C:\LRConfig.config file.
