azure - Azure Automation: Run PowerShell after AD user added
问题描述
I'm reviewing Azure Automation, but I couldn't find out if it is possible to run a PowerShell script whenever a new user is added to Active Directory? The scenario I'm researching is whenever a new Office365 account is added through admin.microsoft.com then I want to configure some email preferences for this user. I have my PowerShell script tested already (so these preferences should be set correctly), but now I'm trying to find out how exactly this script should be executed right after account is added.
Thanks,
解决方案
您可以检查 Azure AD 审核日志以创建新用户。您可以将诊断设置(日志)导出到 Azure Monitor(请参阅文档)。
以下是一个想法,但我自己从未尝试过:在 Azure Monitor -> Logs 中,您可以找到例如此查询:
根据您的需要对其进行修改并创建警报规则。在警报规则中,您可以设置一个操作组,以使用 PowerShell 脚本触发您的自动化帐户。
推荐阅读
- c++ - 用于客户 PC 上 32 位 MFC 应用程序的 Windows Defender 阻止安装程序 (MSI)
- html - 具有可滚动页面的绝对位置
- python - 预提交找不到 python 包
- android - 如何使用 AsyncTask 从服务器下载 mp3
- jquery - 从 JSON 文件中获取信息并稍后调用
- excel - 同一列中两个单元格的总和,滞后 n 个单元格
- python - Python 3.4 如何在脚本运行时创建始终位于屏幕顶部的文本行
- html - 如何在不可打印的 div 中使 div 可打印
- c# - 组合框中的项目被添加
- pycharm - Vagrant+PyCharm:如何编辑映射目录之外的文件?