Show user their teams instead of passing ID as parameter

This commit is contained in:
2020-03-22 15:57:32 +00:00
committed by GitHub
parent c54995f9b1
commit bfb9301aef

View File

@@ -7,15 +7,11 @@ This script runs via PowerShell. If you're on Windows, you'll already have this.
2. Allow remote scripts to execute by running `Set-ExecutionPolicy RemoteSigned`. If you don't do this, the script won't run.
3. Install the Microsoft Teams module. To do this, run `Install-Module -Name MicrosoftTeams`. Accept any prompts that you are given.
# Gathering information
You'll need to do a few things before you can run the script:
1. Have a CSV file with the users you want to add. This needs to be in the format `email,role`. You can copy the template if required.
2. Get your group ID. Import the MS Teams module (`Import-Module -Name MicrosoftTeams`) and run `Get-Team -User <EMAIL>`, substituting `<EMAIL>` for your Office 365 email address, to list all teams you are a member of.
# Running the script
1. Download the repository to your PC.
2. Change directory to where you downloaded the repository and import the Import-TeamsUsers module (`Import-Module ./Import-TeamsUsers.psm1`).
3. Run `Import-TeamsUsers -GroupId <GROUPID> -File <FILE>`.
2. Create a CSV file in the format `email,role`. You can copy the template if required.
3. Change directory to where you downloaded the repository and import the Import-TeamsUsers module (`Import-Module ./Import-TeamsUsers.psm1`).
4. Run `Import-TeamsUsers -Email <EMAIL> -File <FILE>`.
# Need help?
If you require assistance running the script, see the help by executing `Get-Help Import-TeamsUsers` (requires importing the module first - see step 2 above). If you still need help, please [send me an email](mailto:luke@tainton.uk?subject=I%20need%20help%20running%20Import-TeamsUsers).