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
#Pass Arguments to Input prompt received from external CLI tool inside script | |
$DatabricksUrl = 'https://#{AZURE-DATABRICKS-TENANT-URL}#' | |
$dapiToken ='#{AZURE-DATABRICKS-TENANT-DAPI-TOKEN}#' | |
$args = @" | |
$DatabricksUrl | |
$dapiToken | |
"@ |
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
#!/bin/bash | |
DatabricksUrl='https://#{AZURE-DATABRICKS-TENANT-URL}#' | |
dapiToken='#{AZURE-DATABRICKS-TENANT-DAPI-TOKEN}#' | |
databricks configure --token <<EOF | |
${DatabricksUrl} | |
${dapiToken} | |
EOF | |
echo -e "\nDatabricks workspace list:" | |
databricks workspace list |
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
& myclitool login -url "URL" -username "USERNAME" -secret "PASSWORDorSECRET" |
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
> New-FeatureBranchName -id 264 -title 'Create Azure VM via ARM Template' | |
feature/264_Create_Azure_VM_via_ARM_Template | |
#or with initials | |
> New-FeatureBranchName -id 264 -title 'Create Azure VM via ARM Template' -initials ms | |
feature/ms/264_Create_Azure_VM_via_ARM_Template |
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-MyAzSub 'proj1-dev' |
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-AzContext -Subscription 'SUBSCRIPTION-NAME-OR-ID' -TenantId 'AZURE-AD-DIRECTORY-TENANT-ID' |
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
# Shows navigable menu of all options when hitting Tab | |
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete | |
# Autocompletion for arrow keys | |
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward | |
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward | |
#Custom functions location | |
$Path = "C:\Users\Mert\source\MertPSFunctions\" | |
Get-ChildItem -Path $Path -Filter *.ps1 |ForEach-Object { |
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
> $profile | |
> C:\Users\Mert\Documents\PowerShell\Microsoft.PowerShell_profile.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 New-FeatureBranchName { | |
[CmdletBinding()] | |
param ( | |
# Work Item ID | |
[Parameter(Mandatory)][Alias('i','id')][string]$workItemId, | |
# Work Item Title | |
[Parameter(Mandatory)][Alias('t','title')][string]$workItemTitle, | |
# Initials | |
[Parameter()][Alias('in','name', 'inits')][string]$initials | |
) |
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 Set-MyAzSub { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true, Position = 0)][string]$SubCode | |
) | |
$SubscriptionTable = @{ | |
'proj1-dev' = @{ | |
'SubscriptionName' = '' #Name of subscription Ex: 'Project1 - Development' | |
'SubscriptionId' = '' #Subscription ID(GUID) Ex: cb9ace2f-e5e1-42ba-afe2-b9a4d6126e01 |