{"id":1335,"date":"2018-10-16T13:51:20","date_gmt":"2018-10-16T12:51:20","guid":{"rendered":"https:\/\/dbafox.com\/?p=1335"},"modified":"2018-10-16T14:32:57","modified_gmt":"2018-10-16T13:32:57","slug":"sql-server-add-powershell-dbatools-module","status":"publish","type":"post","link":"https:\/\/dbafox.com\/?p=1335","title":{"rendered":"SQL Server &#8211; Add Powershell dbatools module"},"content":{"rendered":"<h2>Add Powershell dbatools module<\/h2>\n<p>Execute an elevated powershell session (Execute as administrator) and run the command:<\/p>\n<p>Import-Module dbatools <\/p>\n<pre class=\"toolbar-overlay:false lang:sh decode:true \" title=\"Import PowerShell dbatools module - Windows\" >Windows PowerShell\r\nCopyright (C) 2016 Microsoft Corporation. All rights reserved.\r\n\r\nLoading personal and system profiles took 756ms.\r\nPS C:\\WINDOWS\\system32&gt; Install-Module dbatools\r\n\r\nNuGet provider is required to continue\r\nPowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet provider must be available in 'C:\\Program Files\\PackageManagement\\ProviderAssemblies' or\r\n 'C:\\Users\\hell\\AppData\\Local\\PackageManagement\\ProviderAssemblies'. You can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want\r\n PowerShellGet to install and import the NuGet provider now?\r\n[Y] Yes  [N] No  [S] Suspend  [?] Help (default is \"Y\"): Y\r\n\r\nUntrusted repository\r\nYou are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the\r\nmodules from 'PSGallery'?\r\n[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is \"N\"): Y\r\nPS C:\\WINDOWS\\system32&gt;<\/pre>\n<h2>Security Aspects<\/h2>\n<p>This article <a href=\"https:\/\/dbatools.io\/secure\/\" rel=\"noopener\" target=\"_blank\">Security Aspects<\/a> by Chrissy Lemaire explains security-related issues (for the dbatools module and PowerShell in general).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Add Powershell dbatools module Execute an elevated powershell session (Execute as administrator) and run the command: Import-Module dbatools Windows PowerShell Copyright (C) 2016 Microsoft Corporation. All rights reserved. Loading personal and system profiles took 756ms. PS C:\\WINDOWS\\system32&gt; Install-Module dbatools NuGet &hellip; <a href=\"https:\/\/dbafox.com\/?p=1335\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","_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":""},"categories":[24],"tags":[],"class_list":["post-1335","post","type-post","status-publish","format-standard","hentry","category-ms-sql-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL Server - Add Powershell dbatools module - dbafox<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbafox.com\/?p=1335\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server - Add Powershell dbatools module - dbafox\" \/>\n<meta property=\"og:description\" content=\"Add Powershell dbatools module Execute an elevated powershell session (Execute as administrator) and run the command: Import-Module dbatools Windows PowerShell Copyright (C) 2016 Microsoft Corporation. All rights reserved. Loading personal and system profiles took 756ms. PS C:WINDOWSsystem32&gt; Install-Module dbatools NuGet &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbafox.com\/?p=1335\" \/>\n<meta property=\"og:site_name\" content=\"dbafox\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-16T12:51:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-10-16T13:32:57+00:00\" \/>\n<meta name=\"author\" content=\"Ray Fox\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ray Fox\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbafox.com\/?p=1335\",\"url\":\"https:\/\/dbafox.com\/?p=1335\",\"name\":\"SQL Server - Add Powershell dbatools module - dbafox\",\"isPartOf\":{\"@id\":\"https:\/\/dbafox.com\/#website\"},\"datePublished\":\"2018-10-16T12:51:20+00:00\",\"dateModified\":\"2018-10-16T13:32:57+00:00\",\"author\":{\"@id\":\"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb\"},\"breadcrumb\":{\"@id\":\"https:\/\/dbafox.com\/?p=1335#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbafox.com\/?p=1335\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbafox.com\/?p=1335#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbafox.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server &#8211; Add Powershell dbatools module\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbafox.com\/#website\",\"url\":\"https:\/\/dbafox.com\/\",\"name\":\"dbafox\",\"description\":\"DBA Technical Information\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbafox.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb\",\"name\":\"Ray Fox\",\"sameAs\":[\"http:\/\/www.dbafox.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL Server - Add Powershell dbatools module - dbafox","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":"https:\/\/dbafox.com\/?p=1335","og_locale":"en_GB","og_type":"article","og_title":"SQL Server - Add Powershell dbatools module - dbafox","og_description":"Add Powershell dbatools module Execute an elevated powershell session (Execute as administrator) and run the command: Import-Module dbatools Windows PowerShell Copyright (C) 2016 Microsoft Corporation. All rights reserved. Loading personal and system profiles took 756ms. PS C:WINDOWSsystem32&gt; Install-Module dbatools NuGet &hellip; Continue reading &rarr;","og_url":"https:\/\/dbafox.com\/?p=1335","og_site_name":"dbafox","article_published_time":"2018-10-16T12:51:20+00:00","article_modified_time":"2018-10-16T13:32:57+00:00","author":"Ray Fox","twitter_misc":{"Written by":"Ray Fox","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dbafox.com\/?p=1335","url":"https:\/\/dbafox.com\/?p=1335","name":"SQL Server - Add Powershell dbatools module - dbafox","isPartOf":{"@id":"https:\/\/dbafox.com\/#website"},"datePublished":"2018-10-16T12:51:20+00:00","dateModified":"2018-10-16T13:32:57+00:00","author":{"@id":"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb"},"breadcrumb":{"@id":"https:\/\/dbafox.com\/?p=1335#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbafox.com\/?p=1335"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dbafox.com\/?p=1335#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbafox.com\/"},{"@type":"ListItem","position":2,"name":"SQL Server &#8211; Add Powershell dbatools module"}]},{"@type":"WebSite","@id":"https:\/\/dbafox.com\/#website","url":"https:\/\/dbafox.com\/","name":"dbafox","description":"DBA Technical Information","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbafox.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb","name":"Ray Fox","sameAs":["http:\/\/www.dbafox.com"]}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3ecMb-lx","_links":{"self":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/1335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1335"}],"version-history":[{"count":8,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/1335\/revisions"}],"predecessor-version":[{"id":1350,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/1335\/revisions\/1350"}],"wp:attachment":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}