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 Get-AzPimAssignment { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $false)] | |
[string]$Scope | |
) | |
# Checking Azure Context | |
try { | |
$ctx = Get-AzContext |
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
param( | |
$FilterString, | |
$SourceSubscriptionId, | |
$SourceVaultName, | |
$DestinationVaultName, | |
$DestinationSubscriptionId | |
) | |
# Change Context to source Subscription | |
Set-AzContext -Subscription $SourceSubscriptionId |
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
[CmdletBinding(SupportsShouldProcess)] | |
param ( | |
[Parameter(Mandatory=$false)] | |
[String] | |
$KeyVaultName = "kv-share-pw-gwc-c-0", | |
[Parameter(Mandatory=$false)] | |
[String] | |
$ResourceGroupName = "rg-share-pw-gwc-c-0", | |
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 Get-AzTopMonitors { | |
<# | |
.Description | |
This function returns the top-most triggered Azure Monitor Alerts for a given Subscription. Requires existing Azure PowerShell Sign-In. | |
#> | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory)] | |
[string] | |
$SubscriptionId, |
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
# Download Oh my posh | |
sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh | |
sudo chmod +x /usr/local/bin/oh-my-posh | |
# Download themes | |
mkdir ~/.poshthemes | |
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O ~/.poshthemes/themes.zip | |
unzip ~/.poshthemes/themes.zip -d ~/.poshthemes | |
chmod u+rw ~/.poshthemes/*.omp.* | |
rm ~/.poshthemes/themes.zip |
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
[cmdletbinding()] | |
param ( | |
[String]$GitLabUrl, | |
[String]$GitLabAccessToken, | |
[String]$GroupId, | |
[String]$ProjectId, | |
[switch]$Pwsh | |
) |
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
$env:GITLAB_URL = "<git address>" | |
$env:GITLAB_ACCESS_TOKEN = "<Gitlab PAT>" | |
$GLOBAL:filterStr = "(\.tf|\.hcl|\.gitlab-ci\.yml)$" | |
$GLOBAL:GroupId = "<root group id>" | |
$GLOBAL:refArr = [System.Collections.ArrayList]@() | |
function GetGitLinks { | |
param ( | |
$ProjectId | |
) |
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
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $false)] | |
[string[]]$ManagementGroupName = @("mg-prd-core", "mg-prd-lz"), | |
[Parameter(Mandatory = $false)] | |
[switch]$OutputMarkdown | |
) | |
function GetNonCompliantResource { |
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
param ( | |
[String]$TenantId = "ed2da482-854d-467a-a6c5-a56a9c91be6d" | |
) | |
$clusterArr = Get-AzSubscription -TenantId $TenantId | ForEach-Object { $null = Set-AzContext -Subscription $_.SubscriptionId -Tenant $TenantId ; Get-AzAksCluster } | |
$resultArr = [System.Collections.ArrayList]@() | |
function GetNodePoolMaxIp { | |
param ( | |
[Microsoft.Azure.Commands.Aks.Models.PSContainerServiceAgentPoolProfile]$AgentPoolProfile |
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
param ( | |
[String]$OrganizationName = $($Env:SYSTEM_COLLECTIONURI -replace ".$") , | |
[String]$UserName = "serviceuser@organization.com", # this is just a dummy value | |
[String]$PAT = $Env:SYSTEM_ACCESSTOKEN, | |
[String]$StorePath = $PWD | |
) | |
# git config | |
. git config --global credential.interactive false | |
. git config --global credential.credentialStore plaintext |
NewerOlder