Skip to content

Commit

Permalink
Merge pull request #1 from PhilipHaglund/dev
Browse files Browse the repository at this point in the history
Merge from dev v1.5.0
  • Loading branch information
PhilipHaglund authored May 18, 2017
2 parents 447af1d + cc9256e commit f626467
Show file tree
Hide file tree
Showing 39 changed files with 1,528 additions and 51 deletions.
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
//-------- Files configuration --------

// When enabled, will trim trailing whitespace when you save a file.
"files.trimTrailingWhitespace": true,


//-------- PowerShell Configuration --------

// Use a custom PowerShell Script Analyzer settings file for this workspace.
// Relative paths for this setting are always relative to the workspace root dir.
"powershell.scriptAnalysis.settingsPath": "src/ScriptAnalyzerSettings.psd1"
}
121 changes: 121 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${relativeFile}: the current opened file relative to workspaceRoot
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",

// Start PowerShell
"windows": {
"command": "${env.windir}\\sysnative\\windowspowershell\\v1.0\\PowerShell.exe"
},
"linux": {
"command": "/usr/bin/powershell"
},
"osx": {
"command": "/usr/local/bin/powershell"
},

// The command is a shell script
"isShellCommand": true,

// Show the output window always
"showOutput": "always",

"args": [
"-NoProfile", "-ExecutionPolicy", "Bypass"
],

// Associate with test task runner
"tasks": [
{
"taskName": "Clean",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Clean'; Invoke-psake build.psake.ps1 -taskList Clean;",
"Invoke-Command { Write-Host 'Completed Clean task in task runner.' }"
]
},
{
"taskName": "Build",
"suppressTaskName": true,
"isBuildCommand": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Build'; Invoke-psake build.psake.ps1 -taskList Build;",
"Invoke-Command { Write-Host 'Completed Build task in task runner.' }"
]
},
{
"taskName": "BuildHelp",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList BuildHelp'; Invoke-psake build.psake.ps1 -taskList BuildHelp;",
"Invoke-Command { Write-Host 'Completed BuildHelp task in task runner.' }"
]
},
{
"taskName": "Analyze",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Analyze'; Invoke-psake build.psake.ps1 -taskList Analyze;",
"Invoke-Command { Write-Host 'Completed Analyze task in task runner.' }"
]
},
{
"taskName": "Install",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Install'; Invoke-psake build.psake.ps1 -taskList Install;",
"Invoke-Command { Write-Host 'Completed Install task in task runner.' }"
]
},
{
"taskName": "Publish",
"suppressTaskName": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking psake on build.psake.ps1 -taskList Publish'; Invoke-psake build.psake.ps1 -taskList Publish;",
"Invoke-Command { Write-Host 'Completed Publish task in task runner.' }"
]
},
{
"taskName": "Test",
"suppressTaskName": true,
"isTestCommand": true,
"showOutput": "always",
"args": [
"Write-Host 'Invoking Pester'; Invoke-Pester -PesterOption @{IncludeVSCodeMarker=$true};",
"Invoke-Command { Write-Host 'Completed Test task in task runner.' }"
],
"problemMatcher": [
{
"owner": "powershell",
"fileLocation": ["absolute"],
"severity": "error",
"pattern": [
{
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$",
"message": 1
},
{
"regexp": "^\\s+at\\s+[^,]+,\\s*(.*?):\\s+line\\s+(\\d+)$",
"file": 1,
"line": 2
}
]
}
]
}
]
}
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Office365Connect

Office365Connect is a module to connect to all Office 365 services that offer a way in with PowerShell.
The purpose of the module is to easily and quickly connect to all Office 365 services for a tenant using a single credential prompt. Unfortunately Azure MFA is not supported when connecting to the services.


## Installation

If you have the [PowerShellGet](https://msdn.microsoft.com/powershell/gallery/readme) module installed
you can enter the following command:

```PowerShell
Install-Module Office365Connect -Scope CurrentUser
```

Alternatively you can download a ZIP file of the latest version from the [Releases](https://github.com/PhilipHaglund/Office365Connect/releases)
page.

## Documentation

You can learn how to use Office365 by reading the documentation:

- [About Office365Connect](docs/en-US/about_Office365Connect.help.md)
- [Cmdlet Documentation](docs/en-US/Office365Connect.md)


## Maintainers

- [Philip Haglund](https://github.com/PhilipHaglund) - [@KPHaglund](https://twitter.com/KPHaglund)
- You?


## Contiribute

- I welcome contributions, issues and forks!

## License

This project is [licensed under the MIT License](LICENSE.txt).
16 changes: 16 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## What is New in Plaster 1.5.0
May 18, 2017

- Complete refactor and restructure of the module and its functions.
- Each function has it's own .ps1 file.
- Use cuddeling for script blocks since it's more popular.
- A new module baseline using [Plaster](https://github.com/PowerShell/Plaster "Plaster").
- Use a own repository instead of my general PowerShell [repository](https://github.com/PhilipHaglund/PowerShell "repository").
- New module version order using 3 numbers (1.5.0) instead of four (1.0.1.1).
- Add `Exchange Online Protection` as an available service to connect to.
- Fixed some bugs with cached credentials.



### Feedback
Please send your feedback to [https://github.com/PhilipHaglund/Office365Connect/issues](https://github.com/PhilipHaglund/Office365Connect/issues "https://github.com/PhilipHaglund/Office365Connect/issues")
2 changes: 1 addition & 1 deletion build.settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Properties {

# Enable/disable use of PSScriptAnalyzer to perform script analysis.
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$ScriptAnalysisEnabled = $false
$ScriptAnalysisEnabled = $true

# When PSScriptAnalyzer is enabled, control which severity level will generate a build failure.
# Valid values are Error, Warning, Information and None. "None" will report errors but will not
Expand Down
148 changes: 148 additions & 0 deletions docs/en-US/Connect-Office365.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
---
Function Name: Connect-Office365
Download Help Link: https://github.com/PhilipHaglund/Office365Connect/blob/master/docs/en-US/Connect-Office365.md
Help Version: 1.0.0
Locale: en-US
---


# Connect-Office365

## SYNOPSIS
Connect to one or more Office 365 services using Powershell.

## SYNTAX

```
Connect-Office365 [[-Service] <String[]>] [-WhatIf] [-Confirm]
```

## DESCRIPTION
Connect to one or more Office 365 services using Powershell and a Azure AD account.
Some services requires the installation of separate PowerShell modules or binaries:
AzureAD requires a separate module - https://www.powershellgallery.com/packages/AzureAD/ or cmdlet "Install-Module -Name AzureAD"
MsolService requires a separate module - http://go.microsoft.com/fwlink/?linkid=236297
Sharepoint Online requires a separate module - https://www.microsoft.com/en-us/download/details.aspx?id=35588
Skype for Business Online requires a separate module - https://www.microsoft.com/en-us/download/details.aspx?id=39366
Exchange Online, Exchange Online Protection, Complince Center does not require seperate binaries.

DYNAMIC PARAMETERS
-SharepointDomain \<String\>
Parameter available when the Service parameter contains AllService or SharepointOnline.
The SharepointDomain parameter is necessary when connecting to Sharepoint Online sessions ('https://{0}-admin.sharepoint.com' -f $SharepointDomain).
Example for SharepointDomain can be 'Contoso'.

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------
```
Connect-Office365
```

VERBOSE: Conncting to AzureAD.
VERBOSE: Conncting to MSolService.

This command connects to AzureAD and MsolService service sessions using the credentials provided when prompted.
AzureAD and MsolService are the default parameter values for the parameter Services.

### -------------------------- EXAMPLE 2 --------------------------
```
Connect-Office365 -Service ComplianceCenter, ExchangeOnline, AzureAD
```

VERBOSE: Conncting to AzureAD.
VERBOSE: Conncting to Compliance Center.
VERBOSE: Conncting to Exchange Online.

This command connects to AzureAD, ComplianceCenter and ExchageOnline service sessions using the credentials provided when prompted.

### -------------------------- EXAMPLE 3 --------------------------
```
Connect-Office365 -Service AzureAD, SharepointOnline
```

cmdlet Connect-Office365 at command pipeline position 1
Supply values for the following parameters:
(Type !?
for Help.)
SharepointDomain: Contoso

VERBOSE: Conncting to AzureAD.
VERBOSE: Conncting to Sharepoint Online.

This command connect to AzureAD and SharepointOnline.
SharepointOnline session requires a specified URI when connecting.
In this example, Contoso, is provided at the mandatory prompt parameter, SharepointDomain.

### -------------------------- EXAMPLE 4 --------------------------
```
Connect-Office365 -Service AllServices -SharepointDomain Contoso
```

VERBOSE: Connecting to all Office 365 Services.

This command connects to all Office 365 service sessions using the credentials provided when prompted.
The parameter SharepointDomain is explicit provided to avoid the mandatory parameter prompt.

## PARAMETERS

### -Service
Provide one or more Office 365 services to connect to.
Valid values are:
'AllServices', 'AzureAD', 'ComplianceCenter', 'ExchangeOnline', 'ExchangeOnlineProtection', 'MSOnline', 'SharepointOnline' ,'SkypeforBusinessOnline'

```yaml
Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: @('AzureAD','MSOnline')
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
## INPUTS
## OUTPUTS
## NOTES
## RELATED LINKS
[https://github.com/PhilipHaglund/Office365Connect/
https://gonjer.com/](https://github.com/PhilipHaglund/Office365Connect/
https://gonjer.com/)
Loading

0 comments on commit f626467

Please sign in to comment.