Thor Logo dbatools

Credential

Compare-DbaAgReplicaCredential

dbatools team

Compare-DbaAgReplicaCredential View Source dbatools team Windows, Linux, macOS Synopsis Compares SQL Server Credentials across Availability Group replicas to identify configuration differences. Description Compares SQL Server Credentials across all replicas in an Availability Group to identify differences in credential configurations. This helps ensure consistency across AG replicas and detect when credentials have been created or removed on one replica but not others. This is particularly useful for verifying that junior DBAs have applied security changes to all replicas or for troubleshooting issues where credential configurations have drifted between replicas.

Read more

Compare-DbaAvailabilityGroup

dbatools team

Compare-DbaAvailabilityGroup View Source dbatools team Windows, Linux, macOS Synopsis Compares configuration across Availability Group replicas to identify differences in Jobs, Logins, Credentials, and Operators. Description Compares multiple object types across all replicas in an Availability Group to identify configuration differences. This comprehensive command checks SQL Agent Jobs, SQL Server Logins, SQL Server Credentials, and SQL Agent Operators to ensure consistency across AG replicas. This is the main command for comparing AG replica configurations.

Read more

Export-DbaCredential

Chrissy LeMaire (@cl), netnerds.net

Export-DbaCredential View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Exports SQL Server credentials to executable T-SQL CREATE CREDENTIAL scripts Description Exports SQL Server credentials to T-SQL files containing CREATE CREDENTIAL statements that can recreate the credentials on another instance. By default, this includes decrypted passwords, making it perfect for migration scenarios where you need to move credentials between servers. The function generates executable T-SQL scripts that DBAs can run to recreate credentials during migrations, disaster recovery, or when setting up new environments.

Read more

Get-DbaCredential

Garry Bargsley (@gbargsley), blog.garrybargsley.com

Get-DbaCredential View Source Garry Bargsley (@gbargsley), blog.garrybargsley.com Windows, Linux, macOS Synopsis Retrieves SQL Server Credentials configured for external authentication and resource access. Description Retrieves SQL Server Credentials that are stored securely on the server and used by SQL Server services to authenticate to external resources like file shares, web services, or other SQL Server instances. These credentials are essential for operations like backups to network locations, accessing external data sources, or running SQL Agent jobs that interact with external systems.

Read more

New-DbaCredential

Chrissy LeMaire (@cl), netnerds.net

New-DbaCredential View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Creates a SQL Server credential for authentication to external resources Description Creates a SQL Server credential that stores authentication information for connecting to external resources like Azure storage accounts, network shares, or service accounts. Credentials are commonly used for backup to URL operations, SQL Agent job authentication, and accessing external data sources. The function supports various authentication methods including traditional username/password, Azure storage access keys, SAS tokens, and managed identities.

Read more

Remove-DbaCredential

Mikey Bronowski (@MikeyBronowski), bronowski.it

Remove-DbaCredential View Source Mikey Bronowski (@MikeyBronowski), bronowski.it Windows, Linux, macOS Synopsis Removes SQL credential(s). Description Removes the SQL credential(s) that have passed through the pipeline. If not used with a pipeline, Get-DbaCredential will be executed with the parameters provided and the returned SQL credential(s) will be removed. Syntax Remove-DbaCredential [-SqlInstance <DbaInstanceParameter[]>] [-SqlCredential <PSCredential>] [-Credential <String[]>] [-ExcludeCredential <String[]>] [-Identity <String[]>] [-ExcludeIdentity <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] Remove-DbaCredential [-SqlInstance <DbaInstanceParameter[]>] [-SqlCredential <PSCredential>] [-Credential <String[]>] [-ExcludeCredential <String[]>] [-Identity <String[]>] [-ExcludeIdentity <String[]>] -InputObject <Credential[]> [-EnableException] [-WhatIf] [-Confirm] [<CommonParameters>] Examples Example: 1 PS C:\> Remove-DbaCredential -SqlInstance localhost, localhost\namedinstance Removes all SQL credentials on the localhost, localhost\namedinstance instances.

Read more