Achieve more in less time using the new SQL PowerShell

Slides:



Advertisements
Similar presentations
Connect with life L.Srividya Architect Advisor | Microsoft India.
Advertisements

The Dirty Dozen: Windows PowerShell Scripts for the Busy DBA Ike Ellis.
Under New Management Andrew Fryer Microsoft UK Andrew Fryer Microsoft UK.
03 | Manage Team Foundation Server Steven Borg | Co-founder & Strategist, Northwest Cadence Anthony Borton | ALM Consultant, Enhance ALM.
Microsoft Connect /23/ :39 PM
IT Operations Management
Building AD-SQL-APP Server on AZURE
Convergence /6/2018 © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
SQL Server deployments
Justin Randall SQLintersection Session: Friday, 10:00am-11:15pm Automating SQL Server Administration Using SQLCMD Justin Randall.
5/22/2018 1:39 AM BRK2156 Power BI Report Server: Self-service BI and enterprise reporting on-premises Christopher Finlan Senior Program Manager © Microsoft.
The top ten PowerShell commands for Exchange
Policy Based Management: Introduction & implementation
6/16/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
PowerShell is Happening FOR REAL THIS TIME!!!
TFS Database Import Service for Visual Studio Team Services
Jim Nakashima Program Manager – Cloud Tools Microsoft Corporation
TechEd /3/2018 4:18 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Azure Functions and Automation: The SQL Agent in the Cloud
SQL Server on Linux on All-Flash Arrays
SQL Server + PHP: What’s New
IT Operations Management
Fun with Reporting Services Tools
Martin Abbott Integration MVP
Simplifying XEvents Management with dbatools
SQL Server Integration Services SSIS and PowerShell
Microsoft Ignite /21/2018 8:47 AM
Introduction to PowerShell
Azure Automation and Logic Apps:
11/8/2018 2:35 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or.
Windows PowerShell Remoting: Definitely NOT Just for Servers
dbatools! The reason to finally start learning and using Powershell
Azure PowerShell Aaron Roney Senior Program Manager Cormac McCarthy
Build vNext in VSO and TFS 2015
Azure SQL Database: A Guided Tour
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
SharePoint hosting 101 Where do I host my apps?
TechEd /23/ :44 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Reduce TCO Using Policy-Based Management and Windows PowerShell
Database Continuous Integration and Deployment with Visual Studio SQL Server Data Tools in < 10 minutes Eric Kang Program Manager.
PowerShell for Data Professionals
TechEd /4/2018 3:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Getting started with Powershell for the DBA
12/4/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
The Dirty Dozen: Windows PowerShell Scripts for the Busy DBA
SQLCmd Mode The T-SQL Easy Button
dbatools! The reason to finally start learning and using Powershell
12/29/ :48 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
SQLSERVER:\ Using the SQL Server Provider with PowerShell
Automating the install and upgrade of SQL scripts
PowerShell & PowerBi Reducing DBAs Context Switching
Commands for SQL Server
Microsoft Connect /17/2019 9:55 PM
EXPLORING THE SQL POWERSHELL MODULE
Welcome to Azure Notebooks
TechEd /18/2019 2:43 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Moving from SQL Profiler to xEvents
C++ Productivity Improvements
Zero to Tabular Patrick LeBlanc Data Platform Solution Architect
Pushing Data to and from the Cloud with SQL Azure Data Sync
Andrew Fryer Microsoft UK
Governing Your Enterprise with Policy-Based Management
Service Template Creation from the Ground Up
Tech Ed North America /27/ :04 AM Required Slide
Summit Nashville /26/2019 4:32 AM
dbatools! The reason to finally start learning and using Powershell
Michael Wall Senior DBA, Great Western Malting
TechEd /28/ :34 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
PowerShell for ConfigMgr 2012 SP1
This is the slide shown before the presentation starts
Presentation transcript:

Achieve more in less time using the new SQL PowerShell 5/30/2018 8:41 AM Achieve more in less time using the new SQL PowerShell Aaron Nelson Business Intelligence Consultant © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Aaron Nelson  ANelson@SolidQ.com SolidQ Business Intelligence Consultant Microsoft Data Platform MVP Conference Speaker PASS Summit, Tech Ed, Ignite, SQL Saturdays PASS PowerShell Virtual Group Leader

Too Much to Cover in 20 Minutes More resources available on my blog: http://sqlvariant.com/ Ask me questions on twitter @SQLvariant Check out the PowerShell VG of PASS: http://sqlps.io Over 30 videos on our YouTube channel: http://sqlps.io/video

Where to get these modules 5/30/2018 8:41 AM Where to get these modules Both of these modules are available in the PowerShell Gallery SQL Server Module sqlps.io/sqlserver SSRS Module sqlps.io/ssrs © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Install from an Elevated PowerShell Session Install-Module -Name SqlServer –Force; Install-Module -Name ReportingServicesTools;

Install from an Elevated PowerShell Session 5/30/2018 8:41 AM Install from an Elevated PowerShell Session Update-Module -Name ReportingServicesTools; Update-Module -Name SqlServer; Get-Command -Module ReportingServicesTools Get-Command -Module SqlServer | Out-GridView © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Here are some of the new cmdlets since 2016 Moving Data Invoke-SqlCmd -ConnectionString Parameter -OutputAs (As) Parameter Read-SqlTableData Read-SqlViewData Write-SqlTableData Login Add-SqlLogin Get-SqlLogin Remove-SqlLogin Error Log Get-SqlErrorLog Set-SqlErrorLog SQL Agent Get-SqlAgent Get-SqlAgentJob Get-SqlAgentJobHistory Get-SqlAgentJobSchedule Get-SqlAgentJobStep Get-SqlAgentSchedule SSAS Invoke-ProcessASDatabase Invoke-ProcessTable

Want to be able to Export / Import your Schema using PowerShell? Up-Vote this Connect item: http://sqlps.io/3 (make sure you login otherwise your vote won’t count.)

The SQL Server Provider[s] The different Providers you can use Not all of them are great Name Description SQLRegistration SQL Server Registrations SQL SQL Server Database Engine SQLAS SQL Server Analysis Services SSIS SQL Server Integration Services Xevent SQL Server Extended Events DatabaseXEvent SQL Server Extended Events DAC SQL Server Data-Tier Application DataCollection SQL Server Data Collection SQLPolicy SQL Server Policy Management Utility SQL Server Utility The ones in bold are the one I have experience using The other ones might work, but who knows? The most important provider to know about is the SQLRgistrations provider Would you be interested in a PowerShell Provider for SSRS?

What do they do? They’re like having access to Object Explorer, or even Object Explorer details, but at the command line! <Demo of scripting multiple object, sorted by size, then create date, in Object Explorer Details>

What is the benefit SQL PowerShell doesn’t have as many cmdlets as it should, but these help to fill in the gaps a little. You can see lots of things, but you can also modify them too. In the case of SSAS, they can give you more actionable information that SSMS can.

What is the benefit Dir = Get-ChildItem Running a Dir is almost like piping objects to SELECT-[Object] * Except that it’s different! You can’t always rely on “column names” to be the actual “property name” To confirm this you will need to pipe to Get-Member or SELECT-[Object] *

Demo Aaron Nelson 5/30/2018 8:41 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.