Skip to content

Instantly share code, notes, and snippets.

View Panzerbjrn's full-sized avatar
💭
Fighting the long fight to get stuff to work...

Lars Panzerbjørn Panzerbjrn

💭
Fighting the long fight to get stuff to work...
View GitHub Profile
var environmentConfigurationMap = {
Trial: {
StorageAccount: {
sku: {
name: 'Standard_B1ms'
}
}
}
}
@description('The Azure region into which the resources should be deployed.')
param location string = resourceGroup().location
param CustomerID string
@description('The type of environment.')
@allowed([
'Trial'
'Small'
'Medium'
parameters:
runId: 0
steps:
- task: PowerShell@2
displayName: Deploying Storage Account
inputs:
targetType: 'inline'
script: |
Write-Output "Inline Script"
parameters:
- name : region
displayName: Which region to deploy to.
type: string
values:
- 'Germany West Central'
- 'West Europe'
- name : environment
displayName: Environment to deploy.
type: string
parameters:
runId: 0
azureResourceManagerConnection: ''
subscriptionId: ''
artifactName: ''
resourcesLocation: ''
deployKeyVault: false
deployStorage: false
deployManagement: false
deployDashboards: false
@Panzerbjrn
Panzerbjrn / GuiMenu.ps1
Created November 4, 2021 09:24
GUI menu for Powershell
Remove-Variable * -ErrorAction SilentlyContinue
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
[System.Windows.Forms.Application]::EnableVisualStyles()
$Font = 'Microsoft Sans Serif,8'
$FontConsole = 'Lucida Console,8'
#region Functions to create Elements
@Panzerbjrn
Panzerbjrn / Get-vROpsData.ps1
Created April 28, 2021 11:39
Basic script to get vROps data
$Accept = 'application/json'
$AuthHeaders = @{
accept = $Accept
}
$Body = @{
refresh_token = '<Insert Your Own API Key Here>'
}
$AuthResponseSplat = @{
Method = "Post"
Uri = "https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize"