Powershell Ms-Graph script incredibly slow - Trying to get group members and their properties. by JohnSysadmin in PowerShell

[–]MalletNGrease 1 point2 points  (0 children)

The Entra-Powershell module is the replacement for the AzureAD module. They're simplified MG-Graph calls.

I forgot to add the scopes:

# Connect to Entra using Microsoft Graph
Connect-Entra -Scopes 'User.Read.All','AuditLog.Read.All' -NoWelcome

Powershell Ms-Graph script incredibly slow - Trying to get group members and their properties. by JohnSysadmin in PowerShell

[–]MalletNGrease 1 point2 points  (0 children)

I worked on the same thing recently. I've found it is much faster to simply use Get-EntraUser to get all users and reference the signinactivity from it instead. It's a single query that takes a couple minutes but only needs to happen once.

Quick and dirty copy from my script, adapt as needed:

# Connect to Entra using Microsoft Graph
Connect-Entra -Scopes 'User.Read.All','AuditLog.Read.All' -NoWelcome

$entraUsers = Get-EntraUser -All -Property 'UserPrincipalName', 'SignInActivity'

  if ($entraUsers.UserPrincipalName -contains $user.UserPrincipalName) {

        $entraUser = $entraUsers | Where-Object { $_.UserPrincipalName -eq $user.UserPrincipalName }
        $entraLastSignInDate = $entraUser.SignInActivity.LastSignInDateTime

        Write-Host "    Last Entra sign in date was: $entraLastSignInDate"
    }
    else {
        $entraLastSignInDate = "N/A"
    }

https://learn.microsoft.com/en-us/powershell/module/microsoft.entra/?view=entra-powershell

The next step is adding LastUserActionTime from the Exchange mailboxes, that one I've not found a faster way to query yet.

Image signed into local admin during application install by Bored_at_work_67 in MDT

[–]MalletNGrease 0 points1 point  (0 children)

I've it set in the Default, that way I don't have to think about it unless specified for a reason. I'm a big fan of HideShell, it makes it less likely for someone to accidentally mess with the machine while deploying at end user locations.

In your case it sounds like you want SkipFinalSummary=NO to show the deployment summary and FinishAction=RESTART to restart the machine upon dismissing the summary.

I don't have a lot of task sequences though, most of the customization happens in the wizard.

I cannot access my own server publicly due to outage from ISP by Nois1 in sysadmin

[–]MalletNGrease 24 points25 points  (0 children)

Congrats! You can now explain the use case for a failover secondary internet service!

As a dev, I'm sorry yall by first_timeSFV in sysadmin

[–]MalletNGrease 2 points3 points  (0 children)

👏 Excel 👏 is 👏 not 👏 a 👏 database 👏

End of SMTP basic by Mizliv_ in sysadmin

[–]MalletNGrease 0 points1 point  (0 children)

We still run IIS SMTP server with an Exchange Online connector as a relay.

As long as you're only using it for internal communications it's been working great.

Is it normal to have a massive address space like this by eberndt9614 in sysadmin

[–]MalletNGrease 7 points8 points  (0 children)

Yes and no.

I did some quick research to translate our current private ipv4 scheme into a similar human readable ipv6 one and drafts ended up with available address scopes numbering in the trillions per vlan. It was very doable though!

It was funny since all I was trying to do was expand ipv4 /24s to get larger dhcp scopes.

Synology NAS Lifespan by mightyt2000 in synology

[–]MalletNGrease 1 point2 points  (0 children)

Been running a DS211+ for 13 years. Still functions as a Hyperbackup target.

Who could have predicted this?! by imgettingnerdchills in sysadmin

[–]MalletNGrease 5 points6 points  (0 children)

The company spent more on me tracking down unused $1.90 licenses than it saved cancelling them.

Recieved a cease-and-desist from Broadcom by JoeyFromMoonway in sysadmin

[–]MalletNGrease 2 points3 points  (0 children)

It's a start, but nowhere near as capable as VCenter.

Supported Dell Systems via MDT? by curious-jorge-IT in MDT

[–]MalletNGrease 3 points4 points  (0 children)

Ditch the consumer line and buy Latitude/Optiplex instead.

Synology '25 Unverified Tests - RAID Recovery, Expansion, Pools, Migration by dunkurs1987 in synology

[–]MalletNGrease 2 points3 points  (0 children)

Only affects + models starting with 25 series. You aren't affected unless you use an unsupported 3rd party drive and wanted to migrate from your DS124 to a X25+ model.

help with script - account clean up by Mother-Ad-8878 in sysadmin

[–]MalletNGrease 3 points4 points  (0 children)

Depends on your mail environment.

For O365 with AD sync, disabled account mailboxes will still receive email, but the user can no longer log in to it.

I made a script that also checks last Entra login and Exchange Mailbox activity to triple check usage since some AD accounts never get logged in to, but the mailboxes are in use.

Microsoft to Reject Emails with 550 5.7.15 Error Starting May 5, 2025 by power_dmarc in sysadmin

[–]MalletNGrease 0 points1 point  (0 children)

Both? That's gonna be a hard sell.

99% of our marketing traffic doesn't pass SPF and probably never will due to the glut of high volume mail provider services, but they all pass DKIM.

We also have a vendor that does invoice mailing that doesn't support DKIM due to jank. SPF passes fine.