Thor Logo dbatools

Credential

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