Command Reference
Import the module from the repository root:
Import-Module .\AzureSqlVmToolkit.psd1 -ForceNew-AzureSqlVmToolkitDeployment
Section titled “New-AzureSqlVmToolkitDeployment”New-AzureSqlVmToolkitDeployment ` [-ConfigFile <string>] ` [-GeneratePassword] ` [-ShowPassword] ` [-SecurityAssessmentAdvice] ` [-Plan] ` [-WhatIf] ` [-Confirm]| Parameter | Default | Notes |
|---|---|---|
-ConfigFile |
config.yaml |
YAML config path. Relative paths resolve from the repository root/script folder. |
-GeneratePassword |
off | Allows the toolkit to create a missing VM admin password secret for lab/demo use. |
-ShowPassword |
off | Prints the VM admin password. Use only in controlled demos. |
-SecurityAssessmentAdvice |
off | Prints current safety posture and warnings. |
-Plan |
off | Validates config and prints the intended plan without Azure calls. |
-WhatIf |
off | Reads Azure state and reports create/reuse/update/drift decisions without mutating resources. Requires Connect-AzAccount. |
-Confirm |
PowerShell preference | Uses PowerShell confirmation support for the public command. |
Preview:
New-AzureSqlVmToolkitDeployment -ConfigFile .\config.local.yaml -SecurityAssessmentAdvice -PlanAzure-aware dry run:
Connect-AzAccountNew-AzureSqlVmToolkitDeployment -ConfigFile .\config.local.yaml -WhatIfDeploy with a pre-created password secret:
New-AzureSqlVmToolkitDeployment -ConfigFile .\config.local.yaml -SecurityAssessmentAdviceDeploy to a disposable lab and generate the missing password secret:
New-AzureSqlVmToolkitDeployment -ConfigFile .\config.local.yaml -SecurityAssessmentAdvice -GeneratePasswordTest-AzureSqlVmToolkitConfig
Section titled “Test-AzureSqlVmToolkitConfig”Test-AzureSqlVmToolkitConfig [-ConfigFile <string>] [-PassThru]Validates the YAML config without Azure calls. With -PassThru, it returns the parsed config and generated resource-name set.
vm_creation_with_bastion.ps1
Section titled “vm_creation_with_bastion.ps1”The root script remains as a compatibility entry point for existing users.
.\vm_creation_with_bastion.ps1 ` [-ConfigFile <string>] ` [-GeneratePassword] ` [-ShowPassword] ` [-SecurityAssessmentAdvice] ` [-Plan] ` [-WhatIf] ` [-Confirm]| Parameter | Default | Notes |
|---|---|---|
-ConfigFile |
config.yaml |
YAML config path. Relative paths resolve from the repository root/script folder. |
-GeneratePassword |
off | Allows the script to create a missing VM admin password secret for lab/demo use. |
-ShowPassword |
off | Prints the VM admin password. Use only in controlled demos. |
-SecurityAssessmentAdvice |
off | Prints current safety posture and warnings. |
-Plan |
off | Validates config and prints the intended plan without Azure calls. |
-WhatIf |
off | Compatibility wrapper for the module command’s Azure-aware -WhatIf. |
scripts/Test-Local.ps1
Section titled “scripts/Test-Local.ps1”.\scripts\Test-Local.ps1 [-ConfigFile <string>]Runs local parser checks, validates the module manifest, checks version alignment, validates config schema, validates the config through -Plan, runs Pester 5 tests when installed, and runs PSScriptAnalyzer when installed.
Roadmap Commands
Section titled “Roadmap Commands”Commands such as Get-AzureSqlVmToolkitVmSize, Get-AzureSqlVmToolkitSqlImage, and cost-estimate helpers are not part of the tracked toolkit yet.