Skip to content

Commit

Permalink
BREAKING: Rename module (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
luketainton authored Apr 21, 2020
1 parent 99718ae commit 412966e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 26 deletions.
37 changes: 25 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
# Import-TeamsUsers
A Powershell script that imports users from a CSV into a Microsoft Teams team.
# TeamsUserEnroller
A Powershell module that imports users from a CSV into a Microsoft Teams group.

# Setting up your device
This script runs via PowerShell, which is pre-installed on Windows. If you're not on Windows, please download **PowerShell Core** [here](https://github.com/PowerShell/PowerShell/releases). Once you've got PowerShell:
This module uses PowerShell, which is pre-installed on Windows. If you're not on Windows, please [download **PowerShell Core**](https://github.com/PowerShell/PowerShell/releases).
1. Open PowerShell as an administrator.
1. Allow remote scripts to execute by running `Set-ExecutionPolicy RemoteSigned`. If you don't do this, the script won't run.
1. Install the Microsoft Teams module. To do this, run `Install-Module -Name MicrosoftTeams`. Accept any prompts that you are given.
1. Install this module by running `Install-Module -Name Import-TeamsUsers`. Accept any prompts that you are given.
1. Install this module by running `Install-Module -Name TeamsUsersEnroller`.

# Running the script
1. Create a CSV file in the format `email,role`. The first line must be the headers `email,role`. You can copy the template if required.
1. Open PowerShell and run `Import-TeamsUsers -File <FILE>`, where `<FILE>` is the full path to the CSV file.
1. Create a CSV file containing your users and their desired roles. The first line must be the headers `email,role`, for example:
```csv
email,role
jbloggs@example.com,owner
user@example.com,member
```
1. Run `Import-TeamsUsers -File <FILE>`, where `<FILE>` is the path to the CSV 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 4 in _Setting up your device_). If you still need help, please [send me an email](mailto:luke@tainton.uk?subject=I%20need%20help%20running%20Import-TeamsUsers).
<details>
<summary>If you can't run non-signed scripts</summary>
If your policy requires scripts to be digitally signed, run

```powershell
Set-ExecutionPolicy Bypass -Scope Process
```
then try running the command again. You may require administrative rights to do change the Execution Policy.
</details>

# Issues? Want a new feature?
If you're having problems with the script or have an idea for a new feature, please check [here](https://github.com/luketainton/Import-TeamsUsers/issues) to see if someone else has the same problem or suggestion, and open an issue if one doesn't already exist. If you can implement a fix or feature request, please file a pull request!
# Need help?
If you need assistance, please try the following:
1. See the help documentation by running `Get-Help Import-TeamsUsers`.
1. Check closed issues [here](https://github.com/luketainton/Import-TeamsUsers/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed).
1. Open an issue [here](https://github.com/luketainton/Import-TeamsUsers/issues/new).
20 changes: 10 additions & 10 deletions Import-TeamsUsers.psd1 → TeamsUserEnroller.psd1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# Module manifest for module 'Import-TeamsUsers'
# Module manifest for module 'TeamsUserEnroller'
#
# Generated by: Luke Tainton
#
# Generated on: 18/04/2020
# Generated on: 21/04/2020
#

@{
Expand All @@ -12,13 +12,13 @@
# RootModule = ''

# Version number of this module.
ModuleVersion = '1.1.0'
ModuleVersion = '2.0.0'

# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID = '8630e592-818c-46d5-b9cc-d94689ff02af'
GUID = 'a7b4e6d0-c92e-40df-a238-2b7a131a13a1'

# Author of this module
Author = 'Luke Tainton'
Expand All @@ -27,10 +27,10 @@ Author = 'Luke Tainton'
CompanyName = 'Luke Tainton'

# Copyright statement for this module
Copyright = '(c) Luke Tainton. All rights reserved.'
Copyright = '(c) 2020 Luke Tainton. All rights reserved.'

# Description of the functionality provided by this module
Description = 'A Powershell function that will enrol users from a CSV file into a given Microsoft Teams group.'
Description = 'A Powershell module that will enrol users from a CSV file into a given Microsoft Teams group.'

# Minimum version of the PowerShell engine required by this module
# PowerShellVersion = ''
Expand Down Expand Up @@ -66,7 +66,7 @@ RequiredModules = @('MicrosoftTeams')
# FormatsToProcess = @()

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
NestedModules = @('./Import-TeamsUsers.psm1')
NestedModules = @('./TeamsUserEnroller.psm1')

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @('Import-TeamsUsers')
Expand All @@ -87,7 +87,7 @@ AliasesToExport = '*'
# ModuleList = @()

# List of all files packaged with this module
FileList = @('./Import-TeamsUsers.psm1')
FileList = @('./TeamsUserEnroller.psm1')

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{
Expand All @@ -101,13 +101,13 @@ PrivateData = @{
# LicenseUri = ''

# A URL to the main website for this project.
ProjectUri = 'https://github.com/luketainton/Import-TeamsUsers'
ProjectUri = 'https://github.com/luketainton/TeamsUserEnroller'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/luketainton/Import-TeamsUsers/releases'
ReleaseNotes = 'https://github.com/luketainton/TeamsUserEnroller/releases'

# Prerelease string of this module
# Prerelease = ''
Expand Down
1 change: 0 additions & 1 deletion Import-TeamsUsers.psm1 → TeamsUserEnroller.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Function Import-TeamsUsers {
.DESCRIPTION
Import-TeamsUsers is a Powershell function that will enrol users from a CSV file into a given Microsoft Teams group.
It has one required parameter: -File.
.PARAMETER File
The path to the CSV file that contains your users. Can either be an absolute path or relative path.
Expand Down
3 changes: 0 additions & 3 deletions template.csv

This file was deleted.

0 comments on commit 412966e

Please sign in to comment.