Comments on: Using Azure Automation to Process Exchange Online Data with PowerShell https://practical365.com/use-azure-automation-exchange-online/ Practical Office 365 News, Tips, and Tutorials Thu, 29 Feb 2024 15:54:47 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_287973'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_287973"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/use-azure-automation-exchange-online/#comment-287973 Thu, 22 Feb 2024 18:36:37 +0000 https://practical365.com/?p=55015#comment-287973 In reply to Tom.

Yes. Covered in https://practical365.com/azure-automation-managed-identity-exo/.

This is the problem with covering a cloud service like Microsoft 365 which changes all the time. I’ll update that post, but when you have thousands of posts to manage, keeping them all updated is a horrendous task. Which is why we have the Office 365 for IT Pros eBook. https://gum.co/O365IT/

]]>
By: Tom https://practical365.com/use-azure-automation-exchange-online/#comment-287972 Thu, 22 Feb 2024 18:32:05 +0000 https://practical365.com/?p=55015#comment-287972 Hi Tony,

It appears that microsoft has updated the exchange module to allow for Managed identities to be used to connect to exchange online:

https://learn.microsoft.com/en-us/powershell/exchange/connect-exo-powershell-managed-identity?view=exchange-ps

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_254511'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_254511"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/use-azure-automation-exchange-online/#comment-254511 Mon, 20 Feb 2023 15:31:55 +0000 https://practical365.com/?p=55015#comment-254511 In reply to Eli.

According to the Get-Command cmdlet, Update-ModuleManifest is part of the PowerShellGet module. You need that module to update from the PowerShell gallery: https://learn.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7.3

]]>
By: Eli https://practical365.com/use-azure-automation-exchange-online/#comment-254510 Mon, 20 Feb 2023 15:26:37 +0000 https://practical365.com/?p=55015#comment-254510 Hi Tony, thanks for the article, I am getting this error after foloowing your instructions “Failed
The term ‘Update-ModuleManifest’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.” Do you have any idea what the cause might be?

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_247953'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_247953"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/use-azure-automation-exchange-online/#comment-247953 Tue, 06 Dec 2022 10:37:31 +0000 https://practical365.com/?p=55015#comment-247953 In reply to Manash.

The Set-AzAutomationVariable https://learn.microsoft.com/en-us/powershell/module/az.automation/set-azautomationvariable?view=azps-9.1.0 cmdlet is available to set variables for an automation account. You’d need to do this before running a script. the Get-AzAutomationVariable cmdlet https://learn.microsoft.com/en-us/powershell/module/az.automation/get-azautomationvariable?view=azps-9.1.0 retrieves the variable value when the script runs.

]]>
By: Manash https://practical365.com/use-azure-automation-exchange-online/#comment-247943 Tue, 06 Dec 2022 05:27:38 +0000 https://practical365.com/?p=55015#comment-247943 Hi Tony great article. can we supply variables to our powershell scripts using service now or you can point me in the right direction. Thanks.

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_246244'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_246244"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/use-azure-automation-exchange-online/#comment-246244 Wed, 02 Nov 2022 16:43:54 +0000 https://practical365.com/?p=55015#comment-246244 In reply to Julian A.

Interesting. Get-User works OK interactively but you’ve found that it doesn’t when executed by an Azure Automation runbook? If so, that’s definitely a bug. But Get-User is a very old cmdlet and Get-MgUser is probably a better bet going forward…

]]>
By: Julian A https://practical365.com/use-azure-automation-exchange-online/#comment-246242 Wed, 02 Nov 2022 16:37:14 +0000 https://practical365.com/?p=55015#comment-246242 In reply to Tony Redmond.

Its the Get-User cmdlet. I may have to look at using Get-MgUser from the graph api.

]]>
By: Tony Redmond https://practical365.com/use-azure-automation-exchange-online/#comment-246237 Wed, 02 Nov 2022 16:05:15 +0000 https://practical365.com/?p=55015#comment-246237 In reply to Julian A.

Do you mean Get-MgUser? If so, Get-MgUser -All returns all available user accounts.

If you mean the Get-User cmdlet, an error after a certain number of results sounds like a bug and I would report it as such to Microsoft (or use Get-MgUser!)

]]>
By: Julian A https://practical365.com/use-azure-automation-exchange-online/#comment-246231 Wed, 02 Nov 2022 15:09:03 +0000 https://practical365.com/?p=55015#comment-246231 Hi Tony, works great.
Well for the first 1000 users anyway.
Do you know if there is a way around the 1000 limit I get using get-user -resultsize unlimited.
Get a error “Invalid pagination request.” If I use -resultsize 1000 it works OK. -resultsize 1001 then Error.

]]>