Skip to content

Instantly share code, notes, and snippets.

@mritsurgeon
mritsurgeon / Azuresettings.ps1
Created February 8, 2020 19:06
Azure VAriable for restore
$accountCloud = Get-VBRAzureAccount -Type ResourceManager -Name "yournamet@yourdomain.com"
$subscription = Get-VBRAzureSubscription -Account $accountCloud -Name "your subscription"
$storageaccount = Get-VBRAzureStorageAccount -Subscription $subscription -Name "southafrica01"
$location = Get-VBRAzureLocation -Subscription $subscription -Name "southafricanorth"
$network = Get-VBRAzureVirtualNetwork -Subscription $subscription -Name "SouthAfrica-Vlan"
$subnet = Get-VBRAzureVirtualNetworkSubnet -Network $network -Name "default"
$resourcegroup = Get-VBRAzureResourceGroup -Subscription $subscription -Name "SouthAfrica-Demo"
@mritsurgeon
mritsurgeon / VBR-DATA-Variable.ps1
Created February 8, 2020 18:50
Azure Backup data Variables
$restorepointNC = Get-VBRBackup -Name "Azurestack Infrastructure" | Get-VBRRestorePoint -Name "AzS-NC01" | Sort-Object $_.creationtime -Descending | Select -First 1
$restorepointACS = Get-VBRBackup -Name "Azurestack Infrastructure" | Get-VBRRestorePoint -Name "AzS-ACS01" | Sort-Object $_.creationtime -Descending | Select -First 1
$restorepointWAS = Get-VBRBackup -Name "Azurestack Infrastructure" | Get-VBRRestorePoint -Name "AzS-WAS01" | Sort-Object $_.creationtime -Descending | Select -First 1
$restorepointWASP = Get-VBRBackup -Name "Azurestack Infrastructure" | Get-VBRRestorePoint -Name "AzS-WASP01" | Sort-Object $_.creationtime -Descending | Select -First 1
$restorepointSRN = Get-VBRBackup -Name "Azurestack Infrastructure" | Get-VBRRestorePoint -Name "AzS-SRNG01" | Sort-Object $_.creationtime -Descending | Select -First 1
$restorepointGW = Get-VBRBackup -Name "Azurestack Infrastructure" | Get-VBRRestorePoint -Name "AzS-Gwy01" | Sort-Object $_.creationtime -Descending | Select -First 1
$restorepointSQL = Get
@mritsurgeon
mritsurgeon / Connect to VBR.ps1
Created February 8, 2020 18:35
Connecting to veeam backup server on PS
Add-PSSnapin VeeamPSSnapin
Connect-VBRServer -Server "veeam"
@mritsurgeon
mritsurgeon / OneNodeRole.xml
Created January 8, 2020 11:14
OneNodeRole for Fabric ASDK Nested
<?xml version="1.0" encoding="UTF-8"?>
-<Role PSClass="Classes\VirtualMachines\VirtualMachines.psm1" Type="Resource" Id="VirtualMachines">
-<PublicInfo>
-<Logs Enabled="True">
@mritsurgeon
mritsurgeon / OneNodeRole.xml
Created January 8, 2020 10:45
One Node Role Infrastructure ASDK Netsed edit
<?xml version="1.0" encoding="utf-8"?>
<Role Id="BareMetal" PSClass="Classes\BareMetal\BareMetal.psm1" xmlns:pp="http://schemas.microsoft.com/ece/2015/preprocessor">
<PublicInfo>
<Logs Enabled ="True">
<FileLog Location="$env:SystemDrive\CloudDeployment\Logs\" />
<FileLog Location="$env:windir\Panther\" />
<FileLog Location="$env:SystemDrive\Windows\Logs\WindowsUpdate\*.etl" />
<FileLog Location="D:\AzureStack\MiniDump\*.dmp" />
<FileLog Location="$env:SystemRoot\*.dmp" />
<FileLog Location="$env:SystemDrive\MASLogs\" />
@mritsurgeon
mritsurgeon / BareMetal.Tests.ps1
Created January 8, 2020 10:30
ASDK Bare Metal test Netsed edit
<###################################################
# #
# Copyright (c) Microsoft. All rights reserved. #
# #
##################################################>
# These tests are expected to run only as part of initial deployment of a stamp.
Import-LocalizedData CommonLocalizedStrings -BaseDirectory $PSScriptRoot\..\..\Common -FileName Roles.Strings.psd1 -ErrorAction SilentlyContinue
Import-LocalizedData BareMetalLocalizedStrings -BaseDirectory $PSScriptRoot\.. -FileName PhysicalMachines.Strings.psd1 -ErrorAction SilentlyContinue
@mritsurgeon
mritsurgeon / ASDK-installer.ps1
Created January 8, 2020 09:48
ASDK-Installer for Nesting
<#
.SYNOPSIS
Short description
This installer UI simplifies the preperation and deployment of the Azure Stack Development Kit
.DESCRIPTION
The Azure Stack Development Kit installer UI provides a UI with the following features
- Prepare the SafeOS for deployment
- Prepare the Azure Stack Development Kit Installation