Giter VIP home page Giter VIP logo

Comments (7)

ThoughtContagion avatar ThoughtContagion commented on August 29, 2024 1

No worries. We've identified a few issues along with the ones that you've identified.
We hope to have a resolution shortly.

from 365inspect.

pcpolice avatar pcpolice commented on August 29, 2024

When executing this in Windows PowerShell 5.1.22621.963 Administrator window, I get the following:
image

from 365inspect.

ThoughtContagion avatar ThoughtContagion commented on August 29, 2024

Please try updating the PowerShellGet module to version 2.2.5 or higher.

https://www.powershellgallery.com/packages/PowerShellGet/2.2.5

If this resolves your issues, let us know and we'll add that check to the tool as well.

from 365inspect.

pcpolice avatar pcpolice commented on August 29, 2024

Hi there,

In pwsh 7.3.4:
image

In Windows PowerShell (administrator session);
image

Verifying it installed (administrator session):
image
Notice that all other required packages for Windows PowerShell isn't installed. Installing them now

Ideally, what context should this script be run in? Administrator or current user? I feel that this script should work irrespective of which sessions its run in.

Anyway, when running in Windows PowerShell 5.1 as Administrator, after manually installing all the modules required by executing the following and closing the sessions and starting a new one:

Install-Module -Name ExchangeOnlineManagement -AllowPrerelease -AllowClobber -Force -RequiredVersion 2.0.5
Install-Module -Name Microsoft.Online.SharePoint.PowerShell -AllowPrerelease -AllowClobber -Force -RequiredVersion 16.0.22601.12000
Install-Module -Name Microsoft.Graph -AllowPrerelease -AllowClobber -Force -RequiredVersion 1.9.6
Install-Module -Name MicrosoftTeams -AllowPrerelease -AllowClobber -Force -RequiredVersion 4.4.1

image

Checks for dependency which I've just installed and then get this error.

from 365inspect.

pcpolice avatar pcpolice commented on August 29, 2024

Hi All,

In Windows PowerShell 5.1
So checking through the script and trying to manually connect to all the services, I noticed on line 79, its trying to connect to Sharepoint Online using Pnp.Powershell. In you instructions, it doesn't say to install that. I've now installed it, tried to Connect-PnpOnline however get an error to import the module. So I do. Then get the culture warning:
image

Sorry to be a pain. Keen to get this script going but it hasn't been hassle-free yet :) haha

from 365inspect.

pcpolice avatar pcpolice commented on August 29, 2024

All good. I finally managed to get this script working by ordering connect statements in the following order:

$user = "[email protected]"
$org = "contoso"
Connect-PnpOnline -Url "https://$org-admin.sharepoint.com" -Interactive
Import-Module Microsoft.Online.Sharepoint.Powershell -UseWindowsPowerShell
Import-Module AzureAd -UseWindowsPowerShell
Connect-AzureAd 
Connect-SPOService -Url "https://$org-admin.sharepoint.com"
Connect-MicrosoftTeam
Connect-ExchangeOnline
Connect-MgGraph -Scopes "AuditLog.Read.All", "Policy.Read.All", "Directory.Read.All", "IdentityProvider.Read.All", "Organization.Read.All", "Securityevents.Read.All", "ThreatIndicators.Read.All", "SecurityActions.Read.All", "User.Read.All", "UserAuthenticationMethod.Read.All", "MailboxSettings.Read", "DeviceManagementManagedDevices.Read.All", "DeviceManagementApps.Read.All", "UserAuthenticationMethod.ReadWrite.All", "DeviceManagementServiceConfig.Read.All", "DeviceManagementConfiguration.Read.All"
Select-MgProfile -Name beta
Connect-IPPSSession -UserPrincipalName $user

Then I executed the scripted with -Auth ALREADY_AUTHED and things started working more or less...except for the Mg cmdlets...they had null records. Not sure whether thats to do with the scope or the fact there's no data.

Hope this helps.

from 365inspect.

ThoughtContagion avatar ThoughtContagion commented on August 29, 2024

We have made the necessary changes to fix the authentication and import issues that caused the errors and failure of the *-Mg* commands you observed. We also removed some of the extraneous orphaned code from testing (PnP.PowerShell module). In testing with Windows 11 and PowerShell version 7.3.4.0 and PowerShell Preview version 7.4.1.0, all processes worked as expected and generated the expected reports.

from 365inspect.

Related Issues (20)

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.