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)] | |
[string] $ResourceGroupName | |
) | |
# Remove currently executing service principal from AAS admin list | |
$azAnalysisServicesServer = Get-AzAnalysisServicesServer -ResourceGroupName $ResourceGroupName | |
$azContext = Get-Azcontext | |
$spApplicationId = ($azContext).Account.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
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory)] | |
[string] $ResourceGroupName | |
) | |
# Add Firewall exception for current IP address | |
$myIpAddress = Invoke-RestMethod https://ipinfo.io/json | Select-Object -ExpandProperty ip | |
$azAnalysisFirewallRule = New-AzAnalysisServicesFirewallRule -FirewallRuleName "az-devops-hosted-agent-$(New-Guid)" -RangeStart $myIpAddress -RangeEnd $myIpAddress | |
$azAnalysisServicesServer = Get-AzAnalysisServicesServer -ResourceGroupName $ResourceGroupName |
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
try { | |
Register-PackageSource -Name PoshTestGallery -Location https://www.poshtestgallery.com/api/v2/ -ProviderName PowerShellGet | |
Install-Module PSScriptAnalyzer -Repository PoshTestGallery -Scope CurrentUser -Force | |
} | |
finally { | |
Unregister-PSRepository -Name PoshTestGallery | |
} |
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
Get-ChildItem -Filter *.ps1 -Recurse | ForEach-Object { Set-Content $_.FullName (Invoke-Formatter (Get-Content $_.FullName -Raw)) -NoNewline } | |
Get-ChildItem -Filter *.psm1 -Recurse | ForEach-Object { Set-Content $_.FullName (Invoke-Formatter (Get-Content $_.FullName -Raw)) -NoNewline } |
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/sh | |
sudo kubeadm join $controller_private_ip:6443 --token $token --discovery-token-ca-cert-hash $hash |
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/sh | |
sudo kubeadm init --pod-network-cidr=10.244.0.0/16 | |
#Set up local kubeconfig: | |
mkdir -p $HOME/.kube | |
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config | |
sudo chown $(id -u):$(id -g) $HOME/.kube/config |
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/sh | |
cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
deb https://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
sudo apt-get update | |
sudo apt-get install -y kubelet kubeadm kubectl | |
# enable iptables bridge call |
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/sh | |
# Install Docker CE | |
sudo apt-get update | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ |
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
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
Invoke-Webrequest 'https://github.com/PowerShell/vscode-powershell/files/2377341/psvsix.zip' -OutFile 'out.zip'; | |
Add-Type -AssemblyName System.IO.Compression.FileSystem; | |
[IO.Compression.ZipFile]::ExtractToDirectory("$($pwd.path)\out.zip", $pwd.path); | |
code --install-extension ./PowerShell-v2-extremely-alpha.vsix; # works also with code-insiders | |
Remove-Item ./PowerShell-v2-extremely-alpha.vsix; | |
Remove-Item ./out.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
iex "& { $(irm 'https://aka.ms/install-pscore ' ) } -Daily" |
NewerOlder