mirror of
https://dev.azure.com/effectory/Survey%20Software/_git/Cloud%20Engineering
synced 2026-02-27 18:52:18 +01:00
Commit 2c6e8ced: Multiple changes
- Check output - Updated list generation - Started subdomain takeover check module
This commit is contained in:
42
Powershell/Lists/Policies.ps1
Normal file
42
Powershell/Lists/Policies.ps1
Normal file
@@ -0,0 +1,42 @@
|
||||
#Connect-AzAccount
|
||||
|
||||
class ResourceCheck {
|
||||
[string] $ResourceId = ""
|
||||
[string] $Id = ""
|
||||
[string] $Kind = ""
|
||||
[string] $Location = ""
|
||||
[string] $ResourceName = ""
|
||||
[string] $ResourceGroupName = ""
|
||||
[string] $ResourceType = ""
|
||||
[string] $SubscriptionId = ""
|
||||
[string] $SubscriptionName = ""
|
||||
[string] $Tag_Team = ""
|
||||
[string] $Tag_Product = ""
|
||||
[string] $Tag_Environment = ""
|
||||
[string] $Tag_Data = ""
|
||||
[string] $Tag_Delete = ""
|
||||
[string] $Tag_Split = ""
|
||||
}
|
||||
|
||||
Write-Host "========================================================================================================================================================================"
|
||||
Write-Host "Creating policy assignment overview."
|
||||
Write-Host "========================================================================================================================================================================"
|
||||
|
||||
# $subscriptions = Get-AzSubscription
|
||||
|
||||
# $fileName = "c:\temp\2020-08-12 azure_policies.csv"
|
||||
# rm $fileName
|
||||
|
||||
# foreach ($subscription in $subscriptions)
|
||||
# {
|
||||
# Set-AzContext -SubscriptionId $subscription.Id
|
||||
|
||||
# $allAssignments = Get-AzPolicyAssignment
|
||||
# $allAssignments | Export-Csv -Path $fileName -Append -NoTypeInformation
|
||||
# }
|
||||
|
||||
$fileName = "c:\temp\2020-08-14 azure_policiy_definitions.csv"
|
||||
Get-AzPolicyDefinition -Builtin | Export-Csv -Path $fileName -NoTypeInformation
|
||||
|
||||
Write-Host "========================================================================================================================================================================"
|
||||
Write-Host "Done."
|
||||
Reference in New Issue
Block a user