Azure AAD Cleanup for AzureStack

After you finished testing your current build of Azure Stack you may want to clean up your Azure AD application registration. Here is a quick way to clean up all the AAD application registrations.

NOTE: USE THIS AT YOUR OWN RISK. THIS WILL CLEAN UP EVERY REGISTRATION.

################ SCRIPT BEGINING ########################

# Name: CleanAAD-AppReg.ps1

# Author: Carlos Vargas

# Clean Azure AAD App Registration

#https://www.powershellgallery.com/packages/AzureADPreview/2.0.0.52
# 1. Install AAD Preview Module : Install-Module -Name AzureADPreview

# Get Creds
$AzureAadCreds = Get-Credential

Connect-AzureAD -Credential $AzureAadCreds

# Get the App Registrations
Get-AzureADServicePrincipal

# Remove the App Service Principal
Get-AzureADServicePrincipal | Remove-AzureADServicePrincipal

# Get Azure AD Applications
Get-AzureADApplication | Remove-AzureADApplication

Adding drivers to Microsoft AzureStack TP2 CloudBuilder.vhdx

So Microsoft release their latest Technical Preview of Azure Stack and everyone looks to be exited about it. Of course it is bringing the power of Azure to your datacenter or in my case to my basement 🙂 .  After downloading the bits and extracting it. I found was stuck. I couldn’t boot the server I was going to use for it. It works for before, what happen now?

I found out that it the latest build it looks like not all the drivers are in the VHDX file. So here is a quick way to add the drivers.

How to Add drivers to Azure Stack TP2 CloudBuilder VHDX

Watch this video on YouTube.

Steps to add drivers to your AzureStack TP2 Cloudbuilder.vhdx file.

  1. Install your OS as normal
  2. Extract the AzureStack TP2 bits
  3. Mount the Cloudbuilder.vhdx file (you should see a D:\ and E:\)
  4. use dism to add your drivers. Ex: (dism /Image:e:\ /Add-Drivers /Drivers:c:\vendorname /Recurse
  5. Right click on E: and click Eject.
  6. Run the PrepareBootFromVHD.ps1 script. Ex: C:\AzureStack_TP2_SupportFiles\PrepareBootFromVHD.ps1 -CloudBuilderDiskPath c:\CloudBuilder.vhdx -ApplyUnattend