Improve this page

CloudBoost-Prep Azure for Workshop.ps1

This script read email addresses from a file. Users are listed in the input file by email address. The email addresses are added as B2B guest accounts in the subscription. For each user a Resource group (RG) and SPN is created. On the RG the guest user and SPN are granted Contributor permissions. The Users, RGs and SPNs are written into the output file.

 
   Version 1.0
      - Initial version
      - Read input file >> default file is "CBWorkshop-In-UserList.txt" > or set the (path)file using the InputFile parameter
                        >> file contains a list of email address > one on each row > to be invited as guest user
      - For each entry in the input file a Guest user is invited, a RG and SPN created, with contrib. permissions on the RG 
      - Created item are exported to the output file >> default file is "CBWorkshop-Out-UsersRgSpn.txt" > or set the (path)file using the OutputFile parameter
      
   Prereqs: xxx  ##
      - Azure PowerShell modules for AzureRM >> AzureRM >> see https://docs.microsoft.com/en-us/powershell/azure/azurerm/install-azurerm-ps
               >> Install using Powershell: 
                     Install-Module -Name AzureRM -AllowClobber

      - Azure Active Directory PowerShell for Graph module >> AzureAD >> see https://docs.microsoft.com/en-us/powershell/module/azuread
                                                                         and https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2
               >> Install using Powershell: 
                     Install-Module AzureAD

      - Create input file > Note: The default filename is CBWorkshop-In-CBUserList.txt placed in the same folder, else specify the file using the -InputFile parameter

      - Start powershell

      - (optional) Login to Azure and set the scope to the right subscription (otherwise login when asked for during the execution of the script)

      - Run script "CloudBoost-PrepAzureForWorkshop.ps1" with the required parameters
             Set-ExecutionPolicy -ExecutionPolicy  RemoteSigned -Scope CurrentUser
             .\CloudBoost-PrepAzureForWorkshop.ps1 -TenantID <TenantID> -SubscriptionID <SubscrID>

        Examples:
             .\CloudBoost-PrepAzureForWorkshop.ps1 -TenantID <TenantID> -SubscriptionID <SubscrID>
             .\CloudBoost-PrepAzureForWorkshop.ps1 -TenantID <TenantID> -SubscriptionID <SubscrID> -SkipVerify
             .\CloudBoost-PrepAzureForWorkshop.ps1 -TenantID <TenantID> -SubscriptionID <SubscrID> -SkipVerify -InputFile [<path>\]CBWorkshop-input.txt -OutputFile [<path>\]CBWorkshop-output.txt

Files