Need Power shell Script to get the reports from Pass services
- Get the Firewall and Virtual Network rules details all (Key Vault, Storage Accounts, Data Lake Store, Data Lake Analytics, Event Hubs, Function Apps, Web Apps, Logic Apps)
- Get all users/apps that have access reports
Thank you.
Hello @IronmanM , could you describe more details about
- your scenarios
- how current Az cannot solve your problem
- and how do you think we can improve Thanks
we are using the below commands to get the resource information.
Connect-AzureRmAccount
Set-AzureRmContext -SubscriptionId 4e3b720e-12X3-4XXXc-a35a-bXYXYXXXXbYYX
Get-AzureRmResource | Export-Csv -Path "C:\azureinventory.csv" ###AzureInventory
For VMs inventory below command ;
[string]$tenantId="",
[string]$file="Azure-ARM-VMs.csv"
)
if ($tenantId -eq "") {
login-azurermaccount
$subs = Get-AzureRmSubscription
} else {
login-azurermaccount -tenantid $tenantId
$subs = Get-AzureRmSubscription -TenantId $tenantId
}
$vmobjs = @()
foreach ($sub in $subs)
{
Write-Host Processing subscription $sub.SubscriptionName
try
{
Select-AzureRmSubscription -SubscriptionId $sub.SubscriptionId -ErrorAction Continue
$vms = Get-AzureRmVm
foreach ($vm in $vms)
{
$vmInfo = [pscustomobject]@{
'Subscription'=$sub.SubscriptionName
'Mode'='ARM'
'Name'=$vm.Name
'ResourceGroupName' = $vm.ResourceGroupName
'Location' = $vm.Location
'VMSize' = $vm.HardwareProfile.VMSize
'Status' = $null
'AvailabilitySet' = $vm.AvailabilitySetReference.Id }
$vmStatus = $vm | Get-AzureRmVM -Status
$vmInfo.Status = $vmStatus.Statuses[1].DisplayStatus
$vmobjs += $vmInfo
}
}
catch
{
Write-Host $error[0]
}
}
$vmobjs | Export-Csv -NoTypeInformation -Path $file
Write-Host "VM list written to $file"
So, I need the PaaS services reports what configuration is there and how we should get the reports (like Vnet and firewall rules)
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @karenhammons @sfiguemsft
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @karenhammons @sfiguemsft
@KarenHammons , @sfiguemsft @isra-fel Just checking is there any update on it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc
@KarenHammons who is the Firewall contact for this?
Have you tried Get-AzFirewall?
https://docs.microsoft.com/en-us/powershell/module/az.network/get-azfirewall?view=azps-3.3.0
The firewall JSON should contain all the information you need.
Sure, I will try to thank you.