Skip to content

Command Reference

Import the module from the repository root:

Terminal window
Import-Module .\AzureSqlVmToolkit.psd1 -Force
Terminal window
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:

Terminal window
New-AzureSqlVmToolkitDeployment -ConfigFile .\config.local.yaml -SecurityAssessmentAdvice -Plan

Azure-aware dry run:

Terminal window
Connect-AzAccount
New-AzureSqlVmToolkitDeployment -ConfigFile .\config.local.yaml -WhatIf

Deploy with a pre-created password secret:

Terminal window
New-AzureSqlVmToolkitDeployment -ConfigFile .\config.local.yaml -SecurityAssessmentAdvice

Deploy to a disposable lab and generate the missing password secret:

Terminal window
New-AzureSqlVmToolkitDeployment -ConfigFile .\config.local.yaml -SecurityAssessmentAdvice -GeneratePassword
Terminal window
Test-AzureSqlVmToolkitConfig [-ConfigFile <string>] [-PassThru]

Validates the YAML config without Azure calls. With -PassThru, it returns the parsed config and generated resource-name set.

The root script remains as a compatibility entry point for existing users.

Terminal window
.\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.
Terminal window
.\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.

Commands such as Get-AzureSqlVmToolkitVmSize, Get-AzureSqlVmToolkitSqlImage, and cost-estimate helpers are not part of the tracked toolkit yet.