This file contains hidden or 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
az network nsg list --query '[?!not_null(subnets[])&&!not_null(networkInterfaces[])].{Name:name,RG:resourceGroup,net:subnets}' -o table | |
Name RG | |
------------------------------------------ ---------------------------------------------------- | |
aks-agentpool-31494826-nsg MC_rg-northcentral_cni-overlay-736875_northcentralus | |
labvnet-aci-nsg-northcentralus rg-northcentral | |
labvnet-apisvr-nsg-northcentralus rg-northcentral | |
labvnet-test-vnetapisvr-nsg-northcentralus rg-northcentral | |
aks-agentpool-35655542-nsg mc_rg-eastus_lab-aks-cni_eastus2 | |
## Remove content after '.' in the --query expression. az list -o table then keeps all default fields |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 5 columns, instead of 3 in line 7.
This file contains hidden or 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
tool_name,bcc/bpf,synopsis,descr,kind | |
argdist.py,bcc,https://github.com/iovisor/bcc/blob/master/tools/argdist_example.txt,Trace a function and display a distribution of its parameter values as a histogram or frequency count,function | |
bashreadline.bt,bpftrace,https://github.com/iovisor/bpftrace/blob/master/tools/bashreadline_example.txt,Print entered bash commands from all running shells,process | |
bashreadline.py,bcc,https://github.com/iovisor/bcc/blob/master/tools/bashreadline_example.txt,Print entered bash commands from all running shells,process | |
bindsnoop.py,bcc,https://github.com/iovisor/bcc/blob/master/tools/bindsnoop_example.txt,Trace IPv4 and IPv6 binds()s,network | |
biolatency.bt,bpftrace,https://github.com/iovisor/bpftrace/blob/master/tools/biolatency_example.txt,Block I/O latency as a histogram,disk | |
biolatency.py,bcc,https://github.com/iovisor/bcc/blob/master/tools/biolatency_example.txt,Summarize block device I/O latency as a histogram,disk | |
biolatpcts.py,bcc,https://github.com/iovisor/bcc/blob/master/tool |
This file contains hidden or 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
Show hidden characters
"installed_packages": | |
[ | |
"Compare Side-By-Side", | |
"Expand Selection to Quotes", | |
"Filter Lines", | |
"HighlightWords", | |
"InsertDate", | |
"JSON Reindent", | |
"Kubernetes Manifest autocomplete", | |
"Markdown Table Formatter", |
This file contains hidden or 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
# Generate a self-signed certificate for signing client cert | |
$cert = New-SelfSignedCertificate -Type Custom -KeySpec Signature -Subject "CN=JaishP2SRootCert" -KeyExportPolicy Exportable -HashAlgorithm sha256 -KeyLength 2048 -CertStoreLocation "Cert:\CurrentUser\My" -KeyUsageProperty Sign -KeyUsage CertSign | |
# Generate one and use above cert to sign | |
New-SelfSignedCertificate -Type Custom -DnsName P2SChildCert -KeySpec Signature -Subject "CN=JaishP2SChildCert" -KeyExportPolicy Exportable -HashAlgorithm sha256 -KeyLength 2048 -CertStoreLocation "Cert:\CurrentUser\My" -Signer $cert -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2") | |
# Convert pfx content to base64 string | |
$fileContentBytes = get-content 'C:\users\preet\downloads\wildcard.klwines.com.pfx' -Encoding Byte | |
[System.Convert]::ToBase64String($fileContentBytes) | Out-File ‘pfx-encoded-bytes.txt’ |
This file contains hidden or 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
# Prepare the env | |
$publicip = Get-AzPublicIpAddress -ResourceGroupName Default -name mypublicip | |
$vnet = Get-AzVirtualNetwork -ResourceGroupName Default -name testlinuxvnet | |
$gwSubnet = Get-AzVirtualNetworkSubnetConfig -Name "appgwSubnet" -VirtualNetwork $vnet | |
# Set AGW elements | |
$gipconfig = New-AzApplicationGatewayIPConfiguration -Name "AppGwIpConfig" -Subnet $gwSubnet | |
$fipconfig01 = New-AzApplicationGatewayFrontendIPConfig -Name "fipconfig" -PublicIPAddress $publicip | |
$pool = New-AzApplicationGatewayBackendAddressPool -Name "pool1" | |
$fp01 = New-AzApplicationGatewayFrontendPort -Name "port1" -Port 443 |
This file contains hidden or 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 selected publishers' marketplace images for VM | |
for i in MicrosoftWindowsDesktop MicrosoftWindowsServer SUSE RedHat Canonical; do | |
az vm image list --publisher $i --location eastus --all -o tsv > "$i.tsv" | |
done | |
# az vmss run-command with "pretty" output | |
az vmss run-command invoke -g mc_msh-azuredigitalproducts-riskcommand-prod_aks-riskcommand-prod_eastus -n aks-system1-40580845-vmss --instance-id 5 --command-id RunShellScript --scripts "ps -o pid,user,%mem,command ax | sort -b -k3 -r" --query value[0].message -o tsv | |
# This cmdlet decrypts protectedSettings inside config of an extension. Run it under /var/lib/<ExtensionHandlerFolder> | |
# src: https://github.com/Azure/azure-linux-extensions/tree/master/Diagnostic | |
SETTINGS='config/5.settings';thumbprint=$(jq -r '.runtimeSettings[].handlerSettings.protectedSettingsCertThumbprint' $SETTINGS) | |
jq -r '.runtimeSettings[].handlerSettings.protectedSettings' $SETTINGS | base64 --decode | openssl smime -inform DER -decrypt -recip ../$thumbprint.crt -inkey ../$thum |