Author Tim Cartwright
Classes for use by the module
Property | |
---|---|
public string ServerInstance { get; set; } | The server instance to connect to. |
public string Database { get; set; } | The database name. Defaults to master. |
public PSCredential Credentials { get; set; } | SQL Server credentials if needed. If null, then a trusted connection is used. See: Get-DBUserCredential |
public Hashtable SqlCmdArgs { get;set;} | Arguments that will be used to customize the query per server. These are not real SQL CMD arguments. Merely search and replace tokens |
Constructor | |
---|---|
DBServer(string serverInstance, string database = "master", PSCredential credentials = null, Hashtable sqlCmdArgs = null) | Initializes a new instance of the TCDbTools.DBServer class. |
$servers = @()
$servers += [TCDbTools.DBServer]::new("Server1", "DbName1", $null, @{ arg1 = "server1"; arg2 = "more info..." })