Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
GalGoldi72 committed Sep 3, 2024
1 parent f93f8ce commit 24ec4ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Requires -Modules Az.Resources, Az.Accounts, Az.Compute, Az.ConnectedMachine, Az.SqlVirtualMachine
#Requires -Modules Az, Az.Resources, Az.Accounts, Az.Compute, Az.ConnectedMachine, Az.SqlVirtualMachine

<#
.SYNOPSIS
Expand Down Expand Up @@ -55,7 +55,7 @@ foreach ($vm in $VMResources) {

try {
# Obtain the instance view of the SQL VM
$sqlVMInstanceView = Get-AzSqlVM -ResourceGroupName $vm.ResourceGroupName -Name $vm.Name -ErrorAction Stop
Get-AzSqlVM -ResourceGroupName $vm.ResourceGroupName -Name $vm.Name -ErrorAction Stop
}
catch {
Write-Host "VM $($vm.Name) is missing SQL extension, skipping.."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,17 @@ Therefore, the script will exclude the following resources:
- Linux machines
- Deallocated or disconnected machines

## Prerequisites
* Install the following Powershell modules:
* Az
* Az.Resources
* Az.Accounts
* Az.Compute
* Az.ConnectedMachine
* Az.SqlVirtualMachine

## Examples

```powershell
.\List-notProtectedMachinesDefenderforSQL.ps1 -SubscriptionId 'ada06e68-4678-4210-443a-c6cacebf41c5'
.\list-notProtectedMachinesDefenderforSQL.ps1 -SubscriptionId 'ada06e68-4678-4210-443a-c6cacebf41c5'
```

0 comments on commit 24ec4ce

Please sign in to comment.