User Profile
hspinto
Joined 6 years ago
User Widgets
Recent Discussions
Re: VM Agent Status and Version Reporting
david1718 I believe there's a more efficient way of doing it, but this should work: $vmStatuses = @(); Get-AzVM -ResourceGroupName myResourceGroupName | ForEach-Object { $vmStatus = Get-AzVM -Status -ResourceGroupName $_.ResourceGroupName -Name $_.Name; $vmStatuses += $vmStatus } The $vmStatuses array will contain all the details for each VM, including the agent version, for the VMs that are running.5.5KViews1like2CommentsRe: Connect to Azure AD from Powershell without prompt - what are my options?
Patrick Rote A user principal with a never expiring password and no MFA is the worst you can do for the security of your solution. Use, at least, a service principal - they're meant for non-attended automation. The AzureAD module you are trying to use (Connect-AzureAD) is deprecating and is replaced by the MS Graph SDK I mentioned above. If you want to log into Azure AD with a service principal and MS Graph, you can simply use this: Connect-MgGraph -TenantId "your tenant id" -AppId "service principal app id" -CertificateThumbprint "cert thumbprint" Of course, you must grant to the service principal the required roles/permissions in your Azure AD tenant. If the execution context of your automation allows for it, i.e., it runs from Azure Automation or from an Azure/Arc machine, you can leverage Managed Identities, which are a special type of service principal for which Azure manages the credentials for you. You don't need to use certificates nor passwords. More details here: Managed identities for Azure resources | Microsoft Docs36KViews1like0CommentsRe: Connect to Azure AD from Powershell without prompt - what are my options?
If you want to automate tasks against Azure AD, you should be leveraging Microsoft Graph instead. There's a PowerShell SDK (https://docs.microsoft.com/en-us/graph/powershell/installation). It supports authenticating with an SPN, but I would recommend using a Managed Identity, if possible.38KViews1like2CommentsRe: Azure runbook restart during execution
You are probably reaching Azure Automation memory limits for jobs running in Automation sandboxes. You can try to either optimize your scripts to consume less memory or use Hybrid Workers. See references below: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#automation-limits https://docs.microsoft.com/en-us/azure/automation/automation-windows-hrw-install1.2KViews0likes0CommentsRe: FYI: Azure CIS 1.1.0 (New) Approved VM Extensions Type is NOT the Type Shown on VM Extensions Pane
Michael Carrabine You can also use this Azure Resource Graph query to find out all the VM extensions you have in your VMs. The "extensionType" column will help you finding the correct extension type to use in ASC allowed extensions list. resources | where type =~ 'microsoft.compute/virtualmachines/extensions' | extend vmName = tostring(split(id,'/')[8]) | extend extensionType = tostring(properties.type) | project vmName, extensionType, name | order by vmName asc, extensionType asc5.4KViews0likes0CommentsRe: Azure Hybrid worker not seeing installed modules
Did you install those modules in the Hybrid Worker in an elevated prompt? By default, the hybrid worker job will execute in the Local System context. Therefore, PS modules must be installed system-wide. Can you check if the path C:\Program Files\WindowsPowerShell\Modules contains the required modules?4.4KViews0likes3CommentsRe: Azure advisor API
vneekhra, besides what was already mentioned by other contributors, if you want to increase the chances of getting VM right-size recommendations, you should also raise the CPU threshold to a higher value, by configuring Advisor rules as documented here.1.2KViews0likes0CommentsRe: Azure Design Best Practice for Hybrid Cloud
sc2317, it is impossible to give a detailed recipe that works for every scenario. However, Microsoft has very good content that will help you into your decision making process. I guess you heard about the Cloud Adoption Framework. I am sharing the link to the Landing Zones documentation, but you'll find many other topics of interest around Azure adoption: What is an Azure landing zone? - Cloud Adoption Framework | Microsoft Docs5.1KViews1like0CommentsRe: Cannot reuse the automation account for Strat-Stop off hours VMs.
harshvir, you cannot have two resources of the same type+name in the same resource group. This is an Azure Resource Manager limitation coming from its resource ID scheme but it is also a good practice to avoid naming duplicates. Why would you want to have two resources with the same name? More details about Azure naming convention: Define your naming convention - Cloud Adoption Framework | Microsoft Docs821Views0likes1CommentRe: Azure Automation - Hybrid Worker - Connect-Azure AD
Dodge-1350, yes, the error you're getting means you don't have the required module installed. You just have to run Install-Module -Name AzureADPreview from an elevated PowerShell in your Hybrid Worker. You can find instructions here.6.9KViews1like8CommentsRe: Azure Automation - Hybrid Worker - Connect-Azure AD
Dodge-1350, when using a Hybrid Worker to connect to Azure resources, the easiest way is to use the Run As Account certificate associated with the Automation Account. You must install first the certificate in the Hybrid Worker, by following the steps detailed here. Then you call Connect-AzureAD by using the certificate thumbprint, like this: Connect-AzureAD -Tenant <TenantID> -ApplicationId <ApplicationID> -CertificateThumbprint <CertificateThumbprint> Don't forget to install the AzureADPreview module in the Hybrid Worker. Hope this helps.6.8KViews0likes10CommentsRe: Active Directory admin
ganriver Your DBAs should normally be the database admins. You can assign a Azure AD Group as admin. There is also the possibility of granting the db_owner role to other Azure AD users directly in the databases security model, but the recommended, much simpler way, should be using an Azure AD Group. See other additional considerations here.803Views0likes0CommentsRe: Active Directory admin
ganriver when using SQL Server-based users for managing your Azure SQL databases, you have additional identities/passwords to manage and you cannot leverage identity security features such as MFA. Your SQL Server-based database admin is, let's say, less secure. If you enable Azure AD-based authentication in your SQL database and make one or (preferably) more Azure AD users (the ones that log in to the Azure Portal) as database admins, you will be able to enforce MFA on those users and leverage other identity security features provided by Azure AD. See more details here.805Views0likes3CommentsRe: Azure DNS zone security
nadsurf93, when you provision a DNS Zone in Azure, you are simply using a PaaS service that will allow you to delegate DNS resolution for a domain you own. An Azure DNS Zone by itself is useless until you configure your domain registrar to use Azure DNS name servers for your domain. That's why you don't have to prove ownership to Azure - you can only configure your registrar settings to use Azure name servers if you own the domain, of course. For each DNS Zone, Azure will provide you with 4 name server addresses. If you have multiple Azure DNS Zones with the same name, then their name servers must be different, because this will be the glue between Azure DNS and your registrar configuration. More details on Azure DNS delegation here.1.5KViews0likes1CommentRe: Azure resource group tag requirement exception?
david_milette If you know the name of the temporary resource groups, have you tried to add exclusions or exemptions? Understand scope in Azure Policy - Azure Policy | Microsoft Docs If the resource group name cannot be anticipated, I am afraid you cannot add an exception to something that is unknown.3.2KViews0likes1CommentRe: Azure Active Directory Functions Vs Azure Functions (RBAC)
Hi, fotine Azure AD (AAD) Global Administrators by default do not have privileges over Azure resources. Their role scope is only the AAD itself. However, a Global Administrator can elevate her/himself and become User Access Administrator at the Azure root Management Group - with this privilege, this user can then added her/himself other Azure roles, such as Owner, at any Azure scope. More details here. As you see, AAD Global Admin is the most powerful role in Azure and at least these identities should be very well protected (strong password, MFA, etc.). Answering your question: an AAD Global Administrator can't by default create Azure Resource Groups but has the means to do so by elevating access. Azure Owners (or other Azure roles) have privileges over the Azure scope only (management groups, subscriptions, resource groups, or resources). Their privileges are inherited down the hierarchy. Therefore, a Management Group Owner has privileges down to all the MGs, subscriptions, resource groups, etc. in the MG hierarchy. Having said that, an Azure Owner does not have privileges over Azure AD, unless this user is also granted an AAD privilege (Global Admin, User Admin, etc.).845Views0likes0CommentsRe: Connecting to VM from Azure Automation Runbook
You can absolutely automate processes inside your network with Azure Automation. But you cannot use the sandbox approach. By "sandbox" a mean using the default cloud workers. What you need is a Hybrid Worker, i.e., a worker that runs your runbooks from your own VMs (either on-premises or in your Azure VNet). Please, see the documentation below: https://docs.microsoft.com/en-us/azure/automation/automation-hybrid-runbook-worker6KViews0likes0Comments
Recent Blog Articles
Get Azure Reservations and Savings Plans Insights with the Azure Optimization Engine
When adopting Azure commitments, customers face typically two types of challenges: 1) Estimating the quantities or amount to commit for – e.g., how many VM Reservations of a given size and region, wh...10KViews3likes7CommentsDeploying Microsoft Defender for Servers in Network-Restricted Environments
Microsoft Defender for Servers requires the deployment of several agents to achieve its multiple protection capabilities. As many of our customers run their Windows/Linux server environments without ...11KViews4likes0Comments