Skip to content

Instantly share code, notes, and snippets.

View junichia's full-sized avatar

Junichi Anno junichia

  • Microsoft
  • Japan
View GitHub Profile
@junichia
junichia / file0.txt
Last active November 20, 2019 12:35
Azure AD テナントを削除する ref: https://qiita.com/junichia/items/fd3e441e28b850539af7
Connect-AzureAD -TenantID xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
@junichia
junichia / file0.txt
Last active May 19, 2018 07:52
【20180519 改】AccessToken を使用して Login-AzureRMAccount / Add-AzureRMAccount を実行する ref: https://qiita.com/junichia/items/969a10b2d7beea923b50
Login-AzureRMAccount
param(
[parameter(Mandatory=$true)]
[string]$customernumber
)
$servicePrincipalConnection = Get-AutomationConnection -Name 'AzureRunAsConnection'
Add-AzureRmAccount `
-ServicePrincipal `
-TenantId $servicePrincipalConnection.TenantId `
-ApplicationId $servicePrincipalConnection.ApplicationId `
Configuration CreateNewADForest {
# このスクリプトはDSCにアップロードする。ただし、コンパイルはPowerShellから行う。
param
(
## [Parameter(Mandatory)]
## [string] $CustomerNumber
)
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUserName": {
"metadata": {
"description": "Admin User ID"
},
"type": "string"
version: '2'
services:
blue:
image: XXXXXXXXXX:260
environment:
- VIRTUAL_HOST=XXXXXXXXXX
- VIRTUAL_PORT=5000
- "affinity:container!=stgmysauce_blue_*"
- ASPNETCORE_ENVIRONMENT=Staging
node {
env.MYSAUCE_BUILD_DOCKER = "microsoft/dotnet:1.0.0-preview2-sdk"
slackSend channel: "${channel}", message: "${env.JOB_NAME} - #${env.BUILD_NUMBER} Started (<${env.BUILD_URL}|Open>)"
try {
stage "git checkout"
checkout()