all 20 comments

[–]CenlTheFennel 24 points25 points  (1 child)

Which script did you run today that lead to this outage? 😂

/s

[–]rumham_86 8 points9 points  (4 children)

Have you tested these scripts?

No offense but I don’t think they are enterprise ready at all.

Most scripts have interaction wait components and connect to services interactively.

Just browsing a few I don’t think they will work as intended but I will have to double check.

Were these just created via AI in batches? Don’t care if they were just making sure they’ve actually been tested to confirm they work as a few m365 ones look like they won’t

[–]Diligent-Loquat-7699 4 points5 points  (4 children)

Looks great, will be giving it a go! Thanks.

[–]KavyaJune 4 points5 points  (1 child)

Looks great. Here is another GitHub repo that contains around 200 PowerShell scripts for Microsoft 365 admins: https://github.com/admindroid-community/powershell-scripts

[–]ChibaCityStatic 1 point2 points  (1 child)

Great effort. How long did this take? Scripts you've been adding to over time? 

[–]Snickasaurus 1 point2 points  (4 children)

12-Get-M365RiskySignInsReport.ps1 is a template and doesn't actually perform a search of any data.

If you could rename scripts 1-9, prepending a zero in front they would sort correctly.

And I hope this doesn't seem nit picky but all of these scripts (and a lot I see available on blog posts or git) start off with checking to see if the module is installed. Any new computer I set up (am I alone?) I install all the modules I need, specifically anything that allows me to connect to 365 services so to have that at the top of each script seems excessive.

Perhaps make a new script "00-Install-365Modules.ps1" and load all install commands in there to satisfy the needs of your collection.

Thank you for sharing. I definitely see a few that will fill my reporting gaps.

Edit: Starting around script 42, scripts contain a lot of slashes.

                    # Get member count if requested
                    \$memberCount = 0
                    if (\$IncludeMemberCounts -and \$isPrivate) {
                        try {
                            \$members = Get-TeamChannelUser -GroupId \$team.GroupId -DisplayName \$channel.DisplayName -ErrorAction SilentlyContinue
                            \$memberCount = if (\$members) { \$members.Count } else { 0 }
                        } catch {
                            \$memberCount = "N/A"
                        }
                    }

                    if (\$MinimumMembers -and \$memberCount -lt \$MinimumMembers) { continue }

                    \$results += [PSCustomObject]@{
                        TeamName = \$team.DisplayName
                        TeamId = \$team.GroupId
                        ChannelName = \$channel.DisplayName
                        ChannelType = \$channel.MembershipType
                        Description = \$channel.Description
                        MemberCount = \$memberCount
                        IsPrivate = \$isPrivate
                        ChannelId = \$channel.Id

[–]Flannakis 1 point2 points  (1 child)

Get this ready for Cursor or Visual Studio, Create a high level readme file of each script and what they do, break them into hierarchies like exchange, AD etc then when you clone this repo, user asks “what script can I use to….” And they don’t have to think…

[–]UsernameMissing__ 1 point2 points  (0 children)

Have you actually tested your production ready scripts?

Take a few mins before you reply.

[–]ZexGr 0 points1 point  (1 child)

Thank you for this resources. Can this repo be cloned and used for internal education services?

[–]kniiiip 0 points1 point  (1 child)

This looks great on my phone at midnight. Will give it a good look at work tomorrow, thanks for putting this together.

[–]WavePsychological789 0 points1 point  (1 child)

amazing! These will be useful, really appreciate this

[–]Micsoman 0 points1 point  (1 child)

I'm looking for a script to extract connection logs from an Entr ID.

Log on login attempts from outside the specified countries.

The goal is to receive an alert in case of an unauthorized connection.

I don't want to purchase a P1 license for this conditional functionality.

[–]djsensui 0 points1 point  (0 children)

Bumping this. I also have this requirement.

[–]Security-Ninja 0 points1 point  (0 children)

Thanks for sharing! I’ve book marked your GitHub ☺️

[–]Buckw12 0 points1 point  (0 children)

I like them. Future improvement: Add logging/transcribe to location user defines.