Skip to content

Instantly share code, notes, and snippets.

HARA Yuichiro haray-isao

Block or report user

Report or block haray-isao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View InstallAntimalwareForWindowsVM.sh
# Get extension list
az vm extension image list --publisher microsoft -o table | grep malware
IaaSAntimalware Microsoft.Azure.Security.Test 1.5.2.0
IaaSAntimalware Microsoft.Azure.Security 1.0.0.0
IaaSAntimalware Microsoft.Azure.Security 1.1.0.0
# Install antimalware to Windows VM
az vm extension set --name IaaSAntimalware \
--publisher Microsoft.Azure.Security \
--resource-group myResourceGroup \
View AddAndReadYourOwnSecretToKeyVault.sh
# Add a secret to key vault
az keyvault secret set --vault-name <myKeyVault> \
--name <mySecretName> \
--value <mySecret>
# View the value
az keyvault secret show --vault-name <myKeyVault> --name <mySecretName>
# Authorize user to use the key or secret
az keyvault set-policy --name <myKeyVault> \
--upn <username@domain> \
View AzureKeyVaultAndDiskEncryption.sh
# Enable the Azure Key Vault provider
az provider register -n Microsoft.KeyVault
# Create a resource group
az group create --name myResourceGroup --location southeastasia
# Create Key Vault
keyvault_name=<myuniquekeyvaultname>
az keyvault create \
--name $keyvault_name \
--resource-group myResourceGroup \
--location southeastasia \
View Azure_IaaS_Security_Hands-on.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"type": "string",
"metadata": {
"description": "Username for the Virtual Machine."
}
},
View azure-vote.yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: azure-vote-back
spec:
replicas: 1
template:
metadata:
labels:
app: azure-vote-back
View Azure_CLI_Examples.md

Azure CLI Examples

Select your subscription

List subscriptions your have access to.

az account list
az account list –-output table
az account list –o table
View redirectHttpToHttps.ps1
## Application Gateway で HTTP --> HTTPS リダイレクト
$resourceGroupName = "リソースグループ名"
$appGwName = "Application Gateway 名"
$appGwFrontendIpName = "appGatewayFrontendIP"
$appgw = Get-AzureRmApplicationGateway -ResourceGroupName $resourceGroupName -Name $appGwName
# HTTP ポートの追加
Add-AzureRmApplicationGatewayFrontendPort -Name httpPort -Port 80 -ApplicationGateway $appgw
View azuredeploy-appgw-waf.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"applicationGatewayNameParm":{
"type": "string",
"metadata": {
"description": "Application Gateway name"
}
},
View collationOnAzurePostgreSQL.md

Azure Database for PostgreSQL で様々なCollationでソートを試してみる

Japanese_Japan.932 C en-US English_United States.1252
う゛
う゛ う゛ う゛
View Stop-Start-AzureVM2.ps1
workflow Stop-Start-AzureVM2
{
Param
(
[Parameter(Mandatory=$true)][ValidateNotNullOrEmpty()]
[String]
$credentialName,
[Parameter(Mandatory=$true)][ValidateNotNullOrEmpty()]
[String]
$ResourceGroup,
You can’t perform that action at this time.