View Invoke-KqlQuery.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Invoke-KqlQuery | |
{ <# | |
.SYNOPSIS | |
This command runs a KQL Query against an Azure Data Explorer cluster. | |
.DESCRIPTION | |
This command runs a KQL Query against an Azure Data Explorer cluster using the Azure AD User | |
Authentication method, unless an access token is passed in with the -AccessToken parameter. | |
.PARAMETER ClusterUrl |
View Test-Example.PS1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Test-Example { | |
<# | |
.SYNOPSIS | |
A function to test the Examples inside the Help of a PowerShell command. | |
.DESCRIPTION | |
A function to test the Examples inside the Help of a PowerShell command to see if they can be successfully executed or not. | |
.NOTES | |
Currently, this command only supports testing one example at a time. | |
.LINK | |
https://gist.github.com/SQLvariant/683b6b16212c7e665d1bffb7fbed98c4 |
View Build_SQLInstance_wStringCreds_andPortNumber.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invoke-ExecuteNotebook -InputNotebook .\SQL-on-Docker-with-PowerShell.ipynb -Parameters @{sa_password = 'Test9999'; SQLNumber = 97} |
View Mmmm_Chocolatey.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install chocolatey -y | |
choco install sql-server-management-studio -y | |
choco install azure-data-studio -y | |
choco install azuredatastudio-powershell -y | |
choco install git.install -y | |
choco install vscode -y | |
choco install vscode-powershell -y | |
choco install powerbi -y |
View CellFindingVisitor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Management.Automation.Language; | |
public class ScriptExtent : IScriptExtent | |
{ | |
private readonly IScriptPosition _start; | |
private readonly IScriptPosition _end; |
View Change_Adf_Retries.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Go to wherever the pipelines are. | |
$DownloadLocation = 'C:\temp\ADF\pipeline' | |
cd $DownloadLocation | |
# Just have a quick look. | |
$PipelinesContents = @() | |
foreach($PipelineFile in dir $DownloadLocation){ | |
$PipelineContents = Get-Content -Path $PipelineFile | ConvertFrom-Json -Depth 20 | |
$PipelinesContents += $PipelineContents | |
$PipelineFile = $null |
View Set AzSQL AAD to Remote Group.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Find_and_Replace.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# Search for something inside an ADF file and replace it. #> | |
$Datasets = dir 'C:\temp\MDD-ADF-Test-Repo\dataset' -Recurse | |
foreach($Dataset in $Datasets.Where({$_.Mode -ne 'd----'})){ | |
$Dataset.Name | |
if((Get-Content $Dataset.FullName | foreach{ $_ -match 'AzureSqlDatabase1' }) -eq $true ){"Fix it" | |
(Get-Content $Dataset.FullName).Replace('Azure_SqlDatabase1', 'MDD_SampleSQL_LS') | Set-Content -Path $Dataset.FullName } | |
else{"Nothing to do"} | |
} |
View CopyingPipelineActivities.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View AdventureWorks_Tables.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder