Giter Club home page Giter Club logo

microsoftservicesprofile's Introduction

Microsoft Services PowerShell Profile

Connect to Microsoft 365 services with a single command

IMAGE

Installation

PowerShell

git clone https://github.com/nikkelly/microsoftServicesProfile.git

.<download directory>\servicesProfilev2.ps1 -install

First Time Setup

<download directory>\servicesProfilev2.ps1 -install Image

<download directory>\servicesProfilev2.ps1 -uninstall IMAGE

add-account IMAGE

remove-account IMAGE

Usage

Service Command Module Documentation
Teams Microsoft Teams
Exchange Microsoft Exchange Online
AzureAD Azure Active Directory (AAD V2 PowerShell)
MSOnline MSOnline (AAD V1 Powershell)
SharePoint SharePoint
Security_Compliance Security and Compliance Center

Disconnect close all active connections

connectAll connect to all services at once

Remove-Account Remove saved Account

Add-MFA Add MFA to saved account credentials

Remove-MFA Remove MFA from saved account credentials

$microsoftUser Full user name of the admin user: [email protected]

$domain Full domain name of the admin user: contoso.onmicrosoft.com

Notes

  • Supports accounts with MFA enabled
  • Username and Password are saved to environment variables as encrypted standard strings
  • Will prompt for install if module is not already installed
  • All of the listed service commands (Teams/SharePoint/etc.) will perform these checks:
    • Is the user an admin?
    • Is the necessary module installed? If not already installed, prompt the user for install

Changelog for v2.0

  • Refactored the entire project to be more dynamic
  • No more auto-prompt for credentials
  • Now allows for blank passwords
  • Fixed an issue with SharePoint

microsoftservicesprofile's People

Contributors

nikkelly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jack-lloyd

microsoftservicesprofile's Issues

Teams won't connect with MFA

MFA is enabled and saved to the environment variable

Teams tries to connect but ultimately fails - seems like the MFA switch for Teams isn't working right.

Allow for blank passwords on initial startup

Use case: If you know you're going to be using MFA or the service (sharepoint/MSOL) requires a rich login, the startup shouldn't prompt for a password or at least shouldn't error when it's blank.

Powershell module update?

Discussed in #26

Originally posted by CakeOD36 December 8, 2021
Truly appreciate your work here and just wanted to note that including a simple mechanism for module updates would be a bonus.

Exchange won't connect with MFA

Have credentials saved
Have MFA status saved
Attempted to connect with "Exchange" and run Get-EXORecipient but got this error:

New-ExoPSSession : One or more errors occurred.
At C:\Program
Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\2.0.5\netFramework\ExchangeOnlineManagement.psm1:475 char:30
+ ... PSSession = New-ExoPSSession -ExchangeEnvironmentName $ExchangeEnviro ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-ExoPSSession], AggregateException
    + FullyQualifiedErrorId : System.AggregateException,Microsoft.Exchange.Management.ExoPowershellSnapin.NewExoPSSess
   ion

Used Connect-ExchangeOnline and then completed interactive login.

Add a connection for on-prem exchange

maybe with exchange-server or something

  • prompt for server
  • ask user if they want to store it as a variable for future use.
  • store as a secureString

Add command to re-display commands

Either a new command to display the "prompt" block again Display-Commands

Or is there a way to lock it as the top 10% of the window? Perhaps as a toggle option?

Add option to remove credentials

or add an option to add new credentials that replace the old. This way user doesn't need to navigate to environment variables to change admin accounts

Windows 11 Compatibility

Where I am continuing my own dig on the details it appears that the User Environment variables used by this module are not properly set on Windows 11 machines. This impacts both the credentials used for starting sessions with the various modules and the MFA settings.

SharePoint connection has 'else' error

else : The term 'else' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\admin.nkelly\Github\microsoftServicesProfile\microsoftServicesProfile.ps1:270 char:7
+       else {
+       ~~~~
    + CategoryInfo          : ObjectNotFound: (else:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Seems to be a missing a closing } for if statement starting on microsoftServicesProfile.ps1:267

Add an option to disable update checking

Disable-CheckProfileUpdate to prevent Invoke-CheckProfileUpdate from auto-running

Invoke-WebRequest may trigger security alerts on more sensitive systems/networks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.