Skip to content

Commit

Permalink
Show user their teams instead of passing ID as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
luketainton authored Mar 22, 2020
1 parent c54995f commit bfb9301
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]?subject=I%20need%20help%20running%20Import-TeamsUsers).
Expand Down

0 comments on commit bfb9301

Please sign in to comment.