{"id":17514,"date":"2019-03-18T13:05:25","date_gmt":"2019-03-18T21:05:25","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/powershell\/?p=17514"},"modified":"2022-05-23T09:43:17","modified_gmt":"2022-05-23T17:43:17","slug":"the-powershell-extension-is-now-in-the-azure-data-studio-marketplace","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/the-powershell-extension-is-now-in-the-azure-data-studio-marketplace\/","title":{"rendered":"The PowerShell Extension is now in the Azure Data Studio Marketplace"},"content":{"rendered":"<div class=\"markdown-body\">\n<p>We are excited to announce the PowerShell Extension is available in the <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/azure-data-studio\/what-is?view=sql-server-2017\" rel=\"nofollow\">Azure Data Studio<\/a> (ADS)\nmarketplace!\nNow you can write PowerShell scripts with the full benefits of PowerShell Editor Services\nusing the excellent IDE-like interface that Azure Data Studio provides.<\/p>\n<h2><a id=\"user-content-key-features-this-brings-to-powershell-editing-in-azure-data-studio\" class=\"anchor\" href=\"#key-features-this-brings-to-powershell-editing-in-azure-data-studio\" aria-hidden=\"true\"><\/a>Key Features this Brings to PowerShell Editing in Azure Data Studio<\/h2>\n<ul>\n<li>Syntax highlighting<\/li>\n<li>Code snippets<\/li>\n<li>IntelliSense for cmdlets and more<\/li>\n<li>Rule-based analysis provided by <a href=\"http:\/\/github.com\/PowerShell\/PSScriptAnalyzer\">PowerShell Script Analyzer<\/a><\/li>\n<li>Go to Definition of cmdlets and variables<\/li>\n<li>Find References of cmdlets and variables<\/li>\n<li>Document and workspace symbol discovery<\/li>\n<li>Run selected selection of PowerShell code using <kbd>F8<\/kbd><\/li>\n<li>Launch online help for the symbol under the cursor using <kbd>Ctrl<\/kbd>+<kbd>F1<\/kbd><\/li>\n<li>Basic interactive console support!<\/li>\n<\/ul>\n<h2><a id=\"user-content-how-to-get-the-powershell-extension-in-azure-data-studio\" class=\"anchor\" href=\"#how-to-get-the-powershell-extension-in-azure-data-studio\" aria-hidden=\"true\"><\/a>How to get the PowerShell extension in Azure Data Studio<\/h2>\n<p>If you don&#8217;t already have Azure Data Studio, start <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/azure-data-studio\/download?view=sql-server-2017\" rel=\"nofollow\">here<\/a>.<\/p>\n<p>Once you have Azure Data Studio open, click <code>Clt+Shift+X<\/code> to open the extensions marketplace.\nNext, type <code>PowerShell<\/code> in the search bar.\nClick <code>Install<\/code> on the <code>PowerShell<\/code> page.\nFinally, click <code>Reload<\/code> in order to refresh Azure Data Studio.<\/p>\n<h2><a id=\"user-content-why-we-joined-the-azure-data-studio-marketplace\" class=\"anchor\" href=\"#why-we-joined-the-azure-data-studio-marketplace\" aria-hidden=\"true\"><\/a>Why we joined the Azure Data Studio Marketplace<\/h2>\n<p>Azure Data Studio is a powerful cross-platform database tool for data professionals using the\nMicrosoft family of on-premises and cloud data platforms on Windows, MacOS, and Linux.\nSince PowerShell is a great tool for data management it just made sense to bring the full PowerShell\nediting experience to this marketplace.<\/p>\n<h2><a id=\"user-content-an-example-for-getting-started-with-sql-powershell\" class=\"anchor\" href=\"#an-example-for-getting-started-with-sql-powershell\" aria-hidden=\"true\"><\/a>An example for getting started with SQL PowerShell<\/h2>\n<p>In order to use this example (below), you need to install the SqlServer module from the <a href=\"https:\/\/www.powershellgallery.com\/packages\/SqlServer\" rel=\"nofollow\">PowerShell Gallery<\/a>.<\/p>\n<div class=\"highlight highlight-source-powershell\">\n<code>Install-Module SqlServer AllowPrerelease<\/code><\/p>\n<\/div>\n<blockquote><p>NOTE: With version <code>21.1.18095-preview<\/code> and up, the <code>SqlServer<\/code> module supports <a href=\"https:\/\/github.com\/PowerShell\/PowerShell\">PowerShell Core<\/a> 6.2 and up in addion to Windows PowerShell.<\/p><\/blockquote>\n<p>In this example we take all of the .CSV files in a directory, turn each one into a SQL Server, and insert the data.<\/p>\n<p>Whether you have 7 files, like in our example, or hundreds, using PowerShell to accomplish this task can be huge time saver!<\/p>\n<p>In the below example you&#8217;ll notice the PowerShell script in the green box used to navigate to the directory, turn each file into a SQL server, and insert the data. With the PowerShell extension it is easy to run your script &#8211; simply select the snippet you want to run and type <kbd>F8<\/kbd>. You&#8217;ll also notice the output in the terminal highlighted with an orange box. The arrow from this box shows the newly generated SQL tables.<\/p>\n<p><a href=\"https:\/\/camo.githubusercontent.com\/4863a8e2650ec5f807defab7bfc037bd0f92ff72\/68747470733a2f2f692e696d6775722e636f6d2f7439676a696f682e6a7067\" target=\"_blank\" rel=\"nofollow noopener\"><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/camo.githubusercontent.com\/4863a8e2650ec5f807defab7bfc037bd0f92ff72\/68747470733a2f2f692e696d6775722e636f6d2f7439676a696f682e6a7067\" alt=\"PowerShellExample\" data-canonical-src=\"https:\/\/i.imgur.com\/t9gjioh.jpg\" \/><\/a><\/p>\n<p>As you begin to write your own scripts you&#8217;ll notice you get suggestions from the PowerShell extension, this intellisense will help you to efficently write scripts in Azure Data Studio with PowerShell. As you navigate down the suggestions you will see descriptions of what each cmdlet can do.<\/p>\n<p>In the example below, typing <code>Write-S<\/code> gives you suggestions like <code>Write-SQLTableData<\/code>, and tells you that this cmdlet writes data to the table of a SQL database.<\/p>\n<p><a href=\"https:\/\/user-images.githubusercontent.com\/2644648\/54549911-4f74ec80-4968-11e9-9e76-ac7c549b8ce5.png\" target=\"_blank\" rel=\"nofollow noopener\"><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/user-images.githubusercontent.com\/2644648\/54549911-4f74ec80-4968-11e9-9e76-ac7c549b8ce5.png\" alt=\"intellisense example\" \/><\/a><\/p>\n<p>For more examples of how to take advantage of PowerShell for data management check out this <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/blob\/master\/docs\/azure_data_studio\/README_FOR_MARKETPLACE.md#sql-powershell-examples\">documentation<\/a><\/p>\n<h2><a id=\"user-content-reporting-feedback\" class=\"anchor\" href=\"#reporting-feedback\" aria-hidden=\"true\"><\/a>Reporting Feedback<\/h2>\n<p>An important benefit of being open source is getting feedback from users.\nTo report issues with the extension use our <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/issues\">GitHub repo<\/a>.\nWhen reporting issues be sure to specify that you are using Azure Data Studio.<\/p>\n<p>Sydney Smith\nProgram Manager\nPowerShell Team<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>We are excited to announce the PowerShell Extension is available in the Azure Data Studio (ADS) marketplace! Now you can write PowerShell scripts with the full benefits of PowerShell Editor Services using the excellent IDE-like interface that Azure Data Studio provides. Key Features this Brings to PowerShell Editing in Azure Data Studio Syntax highlighting Code [&hellip;]<\/p>\n","protected":false},"author":2299,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-17514","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>We are excited to announce the PowerShell Extension is available in the Azure Data Studio (ADS) marketplace! Now you can write PowerShell scripts with the full benefits of PowerShell Editor Services using the excellent IDE-like interface that Azure Data Studio provides. Key Features this Brings to PowerShell Editing in Azure Data Studio Syntax highlighting Code [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/2299"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=17514"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17514\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=17514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=17514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=17514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}