Skip to content

ClaudioESSilva/dbatools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dbatools

A collection of modules for SQL Server DBAs. It initially started out as 'sqlmigration', but has now grown into a collection of various commands that help automate DBA tasks.

In my domain joined Windows 10, PowerShell v5, SMO v12 lab, these commands work swimmingly on SQL Server 2000-2016. If you're still using SMO v10 (SQL Server 2008 R2) on your workstation, some functionality may be reduced, but give it a try anyway.

Got any suggestions or bug reports? I check github, but I prefer Trello. Let me know what you'd like to see. Installer

This module is now in the PowerShell Gallery! Run Install-Module dbatools to install. Alternatively, you can perform a local install by running the following command:

Invoke-Expression (Invoke-WebRequest https://git.io/vn1hQ)

This will install the following commands

Copy-SqlAgentCategory
Copy-SqlAlert
Copy-SqlAudit
Copy-SqlAuditSpecification
Copy-SqlBackupDevice
Copy-SqlCentralManagementServer
Copy-SqlCredential
Copy-SqlCustomError
Copy-SqlDatabase
Copy-SqlDatabaseAssembly
Copy-SqlDatabaseMail
Copy-SqlDataCollector
Copy-SqlEndpoint
Copy-SqlExtendedEvent
Copy-SqlJob
Copy-SqlLinkedServer
Copy-SqlLogin
Copy-SqlOperator
Copy-SqlPolicyManagement
Copy-SqlProxyAccount
Copy-SqlResourceGovernor
Copy-SqlServerAgent
Copy-SqlServerRole
Copy-SqlServerTrigger
Copy-SqlSharedSchedule
Copy-SqlSpConfigure
Copy-SqlSysDbUserObjects
Start-SqlMigration

Set-SqlMaxMemory
Get-SqlMaxMemory
Get-SqlServerKey
Get-DetachedDBinfo
Import-CsvToSql
Reset-SqlAdmin
Restore-HallengrenBackup
Watch-SqlDbLogin
Test-SqlConnection
Test-SqlPath
Update-dbatools

A few important notes

  • I try to support SQL Server 2000-2016 and clustered instances when possible
  • SQL Auth and Windows Auth are supported when possible
  • Windows authentication/Windows admin access is required at the Windows Server level for Copy-SqlCredential, Copy-SqlLinkedServer, and Reset-SqlAdmin.
  • SQL Sysadmin access is required unless otherwise specified
  • This module requires SQL Management Objects (SMO). SMO is included when you install SQL Server Management Studio, or you can download it from Microsoft: SQL Server 2014 32-bit SMO or SQL Server 2014 64-bit SMO. The higher the version the better.

dbatools.io is awesome

I documented the module in its entirety pretty much, using markdown, at dbatools.io. Please go visit there, it's pretty. To skip right to the documentation, visit the functions page

About

PowerShell module to help dbas be more productive

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%