My Azure Profile Script
If you like me I work in a lot of virtual lab environments (mostly Azure) and need a way I start them up. I have all my VM's on Auto Shutdown to save some money and only need them when I test.
I wrote a profile script that allows me to do this. This script does not have a UI for it (however now that I mention it, I might make one), but it does display nicely in PowerShell's console window.
When its time to play. I just run one command:
- Start-MyAzureEnvironment
- Set-MyAzureEnvironment
- Get-ParameterOption
- Test-IsISE
- Test-VSCode
- Get-VolumeLevel
- Set-VolumeLevel
- Test-IsAdmin
- Elevate-Process
- Out-Voice
- Open-File
- Install-LatestModule
- Connect-MyAzureEnvironment
- Get-MyAzureNSGRules
- Get-MyAzureVM
- Start-MyAzureVM
- Extract-MaxDuration
- Set-MyJitAccess
- Enable-JitPolicy
- Start-MyAzureEnvironment
- Convert-XMLtoPSObject
- Get-RemoteDesktopData
- Get-MyAzureUserName
- Get-RandomAlphanumericString
- Generate-HyperVMSerialNumber
- Create-MyAzureVM (Not working)
- Get-MyHyperVM
- Kill-MyHyperVM
- Restart-MyHyperV
- Control-MyWindow
- Start-MDTSimulator
- Show-MyCommands
$VoiceWelcomeMessage = $true
$Checkmodules = @('Az','Az.Security','Azure','AzureAD','Microsoft.Graph.Intune','PSIntuneAuth','PSProfile','PSFramework','PSUtil')
[ValidateSet('Win10','SiteA','SiteB')]
And then sync that with lines 40-69
'<name of environment>' {$myTenantID = '<add your tenantid>'
$mySubscriptionName = '<subscription name>'
$mySubscriptionID = '<your subscription id>'
$myResourceGroup = '<your resource group>'
}
Comments
Post a Comment