{"id":870,"date":"2018-09-20T15:47:58","date_gmt":"2018-09-20T20:47:58","guid":{"rendered":"http:\/\/www.sqlnuggets.com\/?p=870"},"modified":"2018-09-20T16:12:41","modified_gmt":"2018-09-20T21:12:41","slug":"getting-started-with-the-dbatools-powershell-module","status":"publish","type":"post","link":"https:\/\/sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/","title":{"rendered":"Getting Started With The dbatools PowerShell Module"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-871\" src=\"https:\/\/sqlnuggets.com\/wp-content\/uploads\/2018\/09\/dbatools-logo-1.png\" alt=\"\" width=\"223\" height=\"64\" \/>If you are looking for a super easy way to start using PowerShell to manage your SQL Servers, then the\u00a0<a href=\"https:\/\/dbatools.io\/\" target=\"_blank\" rel=\"noopener\">dbatools PowerShell module<\/a> is for you!\u00a0 For those that aren&#8217;t familiar, dbatools is a\u00a0<strong>free\u00a0<\/strong>PowerShell module with over 400 SQL Server best practice, administration, development and migration <a href=\"https:\/\/dbatools.io\/commands\/\" target=\"_blank\" rel=\"noopener\">commands<\/a> included.<\/p>\n<p>I have to admit, I&#8217;ve been reluctant to start integrating PowerShell into my daily DBA tasks, even though I&#8217;ve used it a good bit in the past.\u00a0 My main reason for this that I didn&#8217;t have time to write all of the PowerShell scripts to do the things I need to do.\u00a0 But with the dbatools module, a lot of the IF\/THEN and TRY\/CATCH logic seems to have been written for you. So, for example, if you want to add a user, just call the command to add a user.\u00a0 If that user already exists, or if there is a problem, dbatools will exit gracefully with a message telling you what happened.\u00a0 And that&#8217;s just a small example, dbatools has really been well thought out and takes care of a lot of stuff for you behind the scenes.<\/p>\n<h3>Installing dbatools<\/h3>\n<p>Installing dbatools is pretty simple and straight forward.\u00a0 Open a Powershell window (or &#8220;blue DOS&#8221; as I refer to it) as Administrator and run the following command:<\/p>\n<pre class=\"theme:powershell-ise lang:ps decode:true \">Install-Module -Name dbatools<\/pre>\n<p>You will then be greeted by a couple of confirmation prompts where you have specify &#8220;Y&#8221; or &#8220;N&#8221; to do the install, and you&#8217;ll be done.\u00a0 However, there are a few things to note about this install:<\/p>\n<ul>\n<li>Using &#8220;Install-Module&#8221; requires Windows 10, or on Windows 7 and Windows 8 you&#8217;ll need <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/gallery\/getting-started\" target=\"_blank\" rel=\"noopener\">PackageManagement.<\/a><\/li>\n<li>dbatools makes heavy use of SMO (Server Management Objects), which is a C# library for interacting with SQL Server. In fact, it&#8217;s the same library that SSMS uses to interact with SQL Server.\u00a0 Thankfully, Microsoft allows dbatools to include the required SMO libraries in their download.<\/li>\n<li>You do not need Powershell, or dbatools, installed on each of your SQL Servers in order to run the\u00a0SQL Server-only commands, only the machine running the dbatools commands needs the installation. (so you can install on your workstation and run it against your SQL Servers)<\/li>\n<li>For servers that you want to run Windows commands on, you will need\u00a0PowerShell 2.0 (or greater) with remoting enabled.<\/li>\n<\/ul>\n<p>Once your installation completes, you&#8217;ll probably want to test it.\u00a0 Here is a simple command you can run to check the MAXDOP on a server, just replace\u00a0YOURSERVERNAME with the name of the server you want to check.\u00a0 (LOCALHOST will work here too, for testing the local server)<\/p>\n<pre class=\"theme:powershell-ise lang:ps decode:true\">Get-DbaSpConfigure -SqlInstance YOURSERVERNAME -ConfigName MaxDegreeOfParallelism<\/pre>\n<p>Or, if you would prefer just to see the &#8220;configured&#8221; and &#8220;running&#8221; values, simply do this:<\/p>\n<pre class=\"theme:powershell-ise lang:ps decode:true \">Get-DbaSpConfigure -SqlInstance localhost -ConfigName MaxDegreeOfParallelism | SELECT ConfiguredV\r\nalue, RunningValue<\/pre>\n<p>And that&#8217;s it.\u00a0 The dbatools website has a lot of examples for <a href=\"https:\/\/dbatools.io\/getting-started\/\" target=\"_blank\" rel=\"noopener\">getting started<\/a>, and I will be doing <a href=\"https:\/\/sqlnuggets.com\/blog\/tag\/dbatools\/\">more posts<\/a> with real world examples of how I am using it as well.\u00a0 One of the things we are already working on is a standard SQL Server configuration script that we will use on all new SQL Server installations.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are looking for a super easy way to start using PowerShell to manage your SQL Servers, then the\u00a0dbatools PowerShell module is for you!\u00a0 For those that aren&#8217;t familiar, &#8230;<\/p>\n","protected":false},"author":2,"featured_media":841,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[20],"tags":[21,66],"class_list":["post-870","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-automation","tag-dbatools"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Getting Started With The dbatools PowerShell Module - SQL Nuggets<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting Started With The dbatools PowerShell Module - SQL Nuggets\" \/>\n<meta property=\"og:description\" content=\"If you are looking for a super easy way to start using PowerShell to manage your SQL Servers, then the\u00a0dbatools PowerShell module is for you!\u00a0 For those that aren&#8217;t familiar, ...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL Nuggets\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-20T20:47:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-09-20T21:12:41+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png\" \/>\n\t<meta property=\"og:image:width\" content=\"670\" \/>\n\t<meta property=\"og:image:height\" content=\"250\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Eric Cobb\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cfgears\" \/>\n<meta name=\"twitter:site\" content=\"@sqlnugg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eric Cobb\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/#article\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/\"},\"author\":{\"name\":\"Eric Cobb\",\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/#\\\/schema\\\/person\\\/210536254addbc1b9d2d95dc1448b38a\"},\"headline\":\"Getting Started With The dbatools PowerShell Module\",\"datePublished\":\"2018-09-20T20:47:58+00:00\",\"dateModified\":\"2018-09-20T21:12:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/\"},\"wordCount\":509,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/#organization\"},\"image\":{\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sqlnuggets.com\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/powershell4.png\",\"keywords\":[\"Automation\",\"dbatools\"],\"articleSection\":[\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/\",\"url\":\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/\",\"name\":\"Getting Started With The dbatools PowerShell Module - SQL Nuggets\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/#primaryimage\"},\"image\":{\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sqlnuggets.com\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/powershell4.png\",\"datePublished\":\"2018-09-20T20:47:58+00:00\",\"dateModified\":\"2018-09-20T21:12:41+00:00\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/#primaryimage\",\"url\":\"https:\\\/\\\/sqlnuggets.com\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/powershell4.png\",\"contentUrl\":\"https:\\\/\\\/sqlnuggets.com\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/powershell4.png\",\"width\":670,\"height\":250},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/getting-started-with-the-dbatools-powershell-module\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/www.sqlnuggets.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting Started With The dbatools PowerShell Module\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/#website\",\"url\":\"http:\\\/\\\/www.sqlnuggets.com\\\/\",\"name\":\"SQL Nuggets\",\"description\":\"Nuggets Of SQL Server Knowledge\",\"publisher\":{\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/www.sqlnuggets.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/#organization\",\"name\":\"SQL Nuggets\",\"url\":\"http:\\\/\\\/www.sqlnuggets.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/sqlnuggets.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/website-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/sqlnuggets.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/website-logo.jpg\",\"width\":320,\"height\":54,\"caption\":\"SQL Nuggets\"},\"image\":{\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/sqlnugg\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/ericcobb\\\/\"]},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/www.sqlnuggets.com\\\/#\\\/schema\\\/person\\\/210536254addbc1b9d2d95dc1448b38a\",\"name\":\"Eric Cobb\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ca1fc0c7054a668e048f09d412cd4ebf89833c4630fbbfccca78a0678a6bdc2?s=96&d=mm&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ca1fc0c7054a668e048f09d412cd4ebf89833c4630fbbfccca78a0678a6bdc2?s=96&d=mm&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ca1fc0c7054a668e048f09d412cd4ebf89833c4630fbbfccca78a0678a6bdc2?s=96&d=mm&r=pg\",\"caption\":\"Eric Cobb\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/cfgears\"],\"url\":\"https:\\\/\\\/sqlnuggets.com\\\/author\\\/eric-cobb\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Getting Started With The dbatools PowerShell Module - SQL Nuggets","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/","og_locale":"en_US","og_type":"article","og_title":"Getting Started With The dbatools PowerShell Module - SQL Nuggets","og_description":"If you are looking for a super easy way to start using PowerShell to manage your SQL Servers, then the\u00a0dbatools PowerShell module is for you!\u00a0 For those that aren&#8217;t familiar, ...","og_url":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/","og_site_name":"SQL Nuggets","article_published_time":"2018-09-20T20:47:58+00:00","article_modified_time":"2018-09-20T21:12:41+00:00","og_image":[{"width":670,"height":250,"url":"http:\/\/www.sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png","type":"image\/png"}],"author":"Eric Cobb","twitter_card":"summary_large_image","twitter_creator":"@cfgears","twitter_site":"@sqlnugg","twitter_misc":{"Written by":"Eric Cobb","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/#article","isPartOf":{"@id":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/"},"author":{"name":"Eric Cobb","@id":"http:\/\/www.sqlnuggets.com\/#\/schema\/person\/210536254addbc1b9d2d95dc1448b38a"},"headline":"Getting Started With The dbatools PowerShell Module","datePublished":"2018-09-20T20:47:58+00:00","dateModified":"2018-09-20T21:12:41+00:00","mainEntityOfPage":{"@id":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/"},"wordCount":509,"commentCount":0,"publisher":{"@id":"http:\/\/www.sqlnuggets.com\/#organization"},"image":{"@id":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/#primaryimage"},"thumbnailUrl":"https:\/\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png","keywords":["Automation","dbatools"],"articleSection":["PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/","url":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/","name":"Getting Started With The dbatools PowerShell Module - SQL Nuggets","isPartOf":{"@id":"http:\/\/www.sqlnuggets.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/#primaryimage"},"image":{"@id":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/#primaryimage"},"thumbnailUrl":"https:\/\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png","datePublished":"2018-09-20T20:47:58+00:00","dateModified":"2018-09-20T21:12:41+00:00","breadcrumb":{"@id":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/#primaryimage","url":"https:\/\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png","contentUrl":"https:\/\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png","width":670,"height":250},{"@type":"BreadcrumbList","@id":"http:\/\/www.sqlnuggets.com\/getting-started-with-the-dbatools-powershell-module\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.sqlnuggets.com\/"},{"@type":"ListItem","position":2,"name":"Getting Started With The dbatools PowerShell Module"}]},{"@type":"WebSite","@id":"http:\/\/www.sqlnuggets.com\/#website","url":"http:\/\/www.sqlnuggets.com\/","name":"SQL Nuggets","description":"Nuggets Of SQL Server Knowledge","publisher":{"@id":"http:\/\/www.sqlnuggets.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.sqlnuggets.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/www.sqlnuggets.com\/#organization","name":"SQL Nuggets","url":"http:\/\/www.sqlnuggets.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.sqlnuggets.com\/#\/schema\/logo\/image\/","url":"https:\/\/sqlnuggets.com\/wp-content\/uploads\/2023\/11\/website-logo.jpg","contentUrl":"https:\/\/sqlnuggets.com\/wp-content\/uploads\/2023\/11\/website-logo.jpg","width":320,"height":54,"caption":"SQL Nuggets"},"image":{"@id":"http:\/\/www.sqlnuggets.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/sqlnugg","https:\/\/www.linkedin.com\/in\/ericcobb\/"]},{"@type":"Person","@id":"http:\/\/www.sqlnuggets.com\/#\/schema\/person\/210536254addbc1b9d2d95dc1448b38a","name":"Eric Cobb","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3ca1fc0c7054a668e048f09d412cd4ebf89833c4630fbbfccca78a0678a6bdc2?s=96&d=mm&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/3ca1fc0c7054a668e048f09d412cd4ebf89833c4630fbbfccca78a0678a6bdc2?s=96&d=mm&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3ca1fc0c7054a668e048f09d412cd4ebf89833c4630fbbfccca78a0678a6bdc2?s=96&d=mm&r=pg","caption":"Eric Cobb"},"sameAs":["https:\/\/x.com\/cfgears"],"url":"https:\/\/sqlnuggets.com\/author\/eric-cobb\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png","jetpack_shortlink":"https:\/\/wp.me\/pdyDvE-e2","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1513,"url":"https:\/\/sqlnuggets.com\/upcoming-geek-sync-practical-powershell-for-the-busy-dba\/","url_meta":{"origin":870,"position":0},"title":"Upcoming Geek Sync: Practical PowerShell For The Busy DBA","author":"Eric Cobb","date":"November 10, 2020","format":false,"excerpt":"Be sure to sign up for my upcoming IDERA Geek Sync, Practical PowerShell For The Busy DBA on November 19th, 2020 at 11:00 AM CT. I will be focusing on using the dbatools PowerShell module, and show just how great it is at handling many of the tasks that SQL\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/sqlnuggets.com\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/11\/EmZ1VIOWMAMIy-r.jpeg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/11\/EmZ1VIOWMAMIy-r.jpeg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/11\/EmZ1VIOWMAMIy-r.jpeg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/11\/EmZ1VIOWMAMIy-r.jpeg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/11\/EmZ1VIOWMAMIy-r.jpeg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/11\/EmZ1VIOWMAMIy-r.jpeg?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":887,"url":"https:\/\/sqlnuggets.com\/using-dbatools-powershell-module-to-configure-sql-server\/","url_meta":{"origin":870,"position":1},"title":"Using dbatools PowerShell Module To Configure SQL Server","author":"Eric Cobb","date":"October 9, 2018","format":false,"excerpt":"The more I use\u00a0the\u00a0dbatools PowerShell module, the more I like it.\u00a0 It really is a solid set of scripts that allow you to easily manage your SQL Servers via PowerShell.\u00a0 If you are not familiar with dbatools, I recommend you head over to my previous post,\u00a0Getting Started With The dbatools\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/sqlnuggets.com\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":897,"url":"https:\/\/sqlnuggets.com\/using-dbatools-powershell-module-to-set-maxdop-and-max-memory\/","url_meta":{"origin":870,"position":2},"title":"Using dbatools PowerShell Module To Set MAXDOP And Max Memory","author":"Eric Cobb","date":"November 27, 2018","format":false,"excerpt":"As I continue my blog series on using\u00a0the\u00a0dbatools PowerShell module, today I want to discuss using it to set MAXDOP and Max Memory on your SQL Server.\u00a0 This builds directly off of my previous post on\u00a0Using dbatools PowerShell Module To Configure SQL Server, so if you haven't seen that one\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/sqlnuggets.com\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1049,"url":"https:\/\/sqlnuggets.com\/patching-multiple-sql-servers-with-powershell-and-dbatools\/","url_meta":{"origin":870,"position":3},"title":"Patching Multiple SQL Servers With Powershell and dbatools","author":"Eric Cobb","date":"July 18, 2019","format":false,"excerpt":"Patching SQL Server can sometimes be a time consuming process, especially when you have multiple servers that need to be patched. Remoting in to each box to run through the update wizard is tedious, and if you have multiple patches to apply you're going to be spending a considerable chunk\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/sqlnuggets.com\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1158,"url":"https:\/\/sqlnuggets.com\/backing-up-databases-with-the-dbatools-powershell-module\/","url_meta":{"origin":870,"position":4},"title":"Backing Up Databases With The dbatools PowerShell Module","author":"Eric Cobb","date":"November 20, 2019","format":false,"excerpt":"We do a lot of database backups and restores at work, outside of our regular backup routines. A lot! I've actually done as many as 40 in one day. Our \"enterprise\" backup system is too cumbersome to try to use like this, so we needed something that would allow us\u2026","rel":"","context":"In &quot;Backups&quot;","block_context":{"text":"Backups","link":"https:\/\/sqlnuggets.com\/category\/backups\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2018\/07\/powershell4.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1534,"url":"https:\/\/sqlnuggets.com\/setting-the-database-owner-compatibility-level-and-recovery-model-with-powershell\/","url_meta":{"origin":870,"position":5},"title":"Setting The Database Owner, Compatibility Level, And Recovery Model With PowerShell","author":"Eric Cobb","date":"December 30, 2020","format":false,"excerpt":"One of the great things about dbatool is that it allows you to run commands against multiple things. Sometimes you may need to run the same command on every server, or every database on a server, or every database on every server (not recommended). Today we're going to look at\u2026","rel":"","context":"In &quot;Configurations&quot;","block_context":{"text":"Configurations","link":"https:\/\/sqlnuggets.com\/category\/configurations\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/12\/pexels-photo-97077.jpeg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/12\/pexels-photo-97077.jpeg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/12\/pexels-photo-97077.jpeg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/12\/pexels-photo-97077.jpeg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/12\/pexels-photo-97077.jpeg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/sqlnuggets.com\/wp-content\/uploads\/2020\/12\/pexels-photo-97077.jpeg?resize=1400%2C800&ssl=1 4x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/sqlnuggets.com\/wp-json\/wp\/v2\/posts\/870","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sqlnuggets.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sqlnuggets.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sqlnuggets.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sqlnuggets.com\/wp-json\/wp\/v2\/comments?post=870"}],"version-history":[{"count":0,"href":"https:\/\/sqlnuggets.com\/wp-json\/wp\/v2\/posts\/870\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sqlnuggets.com\/wp-json\/wp\/v2\/media\/841"}],"wp:attachment":[{"href":"https:\/\/sqlnuggets.com\/wp-json\/wp\/v2\/media?parent=870"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sqlnuggets.com\/wp-json\/wp\/v2\/categories?post=870"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sqlnuggets.com\/wp-json\/wp\/v2\/tags?post=870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}