• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Clatent

Technology | Fitness | Food

  • About
  • Resources
  • Contact

Reporting

One-Liner Wednesday January 18, 2023

January 18, 2023 by ClaytonT 2 Comments

Do you use 365? Ever needed a quick list of all your users and their mailbox size? What about having it nicely formatted? Or do you only want to see a certain size mailbox? This quick one-liner is a good starting point.

Get-EXOMailbox -ResultSize Unlimited | Get-EXOMailboxStatistics | Select DisplayName, ItemCount, TotalItemSize | Sort-Object TotalItemSize -Descending | Export-Excel -Path C:\scripts\MailboxSizes.xlsx -AutoSize

What this does is uses the current way to get a 365 mailbox(Get-mailbox is deprecated), grabs all the mailboxes, selects only the Display name, amount of emails, and total size of their mailbox. It will then put the largest mailbox at the top and smallest at the bottom. After all of that, it exports it to an excel file that you can manipulate how you like. If you haven’t already used Doug Finke’s ImportExcel module, I’d recommend it to get creative with your formatting without ever opening Excel to format. You could add it so all mailboxes over a certain size are a certain color.

Hope this helps let me know if you expand on this even if its not a one liner, I’d love to see!

Tagged With: 365, Exchange, One Liner Wednesday, PowerShell, Reporting

One-Liner Wednesday December 28, 2022

December 28, 2022 by ClaytonT Leave a Comment

Today’s one-liner Wednesday will be great for system admins that need to see when and which updates were installed on a single server or multiple servers. It’s a quick and dirty way to do it, and I’m going to look around and see if there is a one with better formatting, but this gets the job done for now.

If you only need updates on one computer for the month of September 2022, this is all you need to do.

Export-InstalledPatchTOPDF -ComputerName localhost -month 9 -Year 2022

If you need multiple computers and want for a whole year, you would write this.

Export-InstalledPatchTOPDF -ComputerName localhost, server01, server02, server03 -Year 2022

And that’s it. As mentioned the output formatting could be a little better, but the functionality is great, and will reach out to him to see if he will be fixing it. If not, I’ll definitely be looking for another option.

PowerShell Gallery:
ExportInstalledPatchToPDFUpdated

Blog:
Prakash78

Tagged With: Automation, One Liner Wednesday, PowerShell, Reporting, Windows Server

One-Liner Wednesday October 26, 2022

October 26, 2022 by ClaytonT Leave a Comment

One Liner Wednesday Cyber Security Edition

Want to see the top Malware that hits your 365 Exchange? Try this one liner out

Get-MailTrafficSummaryReport -Category TopMalware -StartDate 08-01-2022 -EndDate 10-25-2022 | Select-Object C1,C2 | out-gridview

This will give you the different types of malware Microsoft has found and how many times it found in since August 1. Then it will display it in a grid view that you can filter. I normally export to Excel/CSV to keep the data as it goes away after 90 days. Bigger organizations I’d recommend pushing it into a database for longer term analytics.

Check out Microsoft Docs and my 365 GitHub Repository for more ideas!

Microsoft Documentation:
Get-MailtrafficSummaryReport

365 Exchange Security Dasboard(Very early stages)
365 Exchange Security Dashboard

My Microsoft 365 GitHub Repository:
Powershell365

Tagged With: 365, Automation, One Liner Wednesday, PowerShell, Reporting

Module Monday October 24, 2022

October 24, 2022 by ClaytonT Leave a Comment

It’s Module Monday…

Although this module could be on Read-Only Friday, I wanted to show you that not all modules change your environment, and they can be extremely helpful getting information for you so you don’t have to create it or yourself. And with it being Cyber Security Month, why not have an easy way to find changes in your Active Directory.

With that said, today’s module is Jeff Hicks ADReportingTools, which I think the name is pretty obvious of what it does, but definitely check out the GitHub for all the reporting it can do. Here are a few of my favorites.

  • Get-ADDomainControllerHealth – this checks storage space, physical memory, % of security log in use, and critical services not running
  • Get-ADUserAudit – which will search the event logs on your domain controller for that specific user events
  • Get-ADGroupUser – which will display all users in that defined group and who any disabled users in red
  • Get-ADSiteSummary – shows a quick view of your sites and subnets
  • Show-DomainTree – this will show your domain in a tree view in your console
  • New-ADDomainReport – I really like this one, it shows you a nice html formatted report of your domain

Hope you take a look at it and if you see any features you’d like, let Jeff know.

PowerShell Gallery:

ADReportingTools/1.4.0

GitHub:
ADReportingTools

Tagged With: AD, Module Monday, PowerShell, Reporting

Read-Only Friday October 21, 2022

October 21, 2022 by ClaytonT Leave a Comment

It’s Friday, so you know what that means!

I like todays, because it’s another one of those it’s easy, but we either forget to check or believe it’s working but it may not be.

What is it? Event logging and dashboards. I’ll admit the dashboard part isn’t easy, but the event logging is. And I’m not just talking about your scripts(which you should be adding event logging to them when possible), I’m talking about any of your infrastructure that you manage. Even if you have alerting on, how do you know the alerting is actually working? Maybe your script or application you are using to go through the logs has an update but you don’t see it since you haven’t checked it in a month thinking it just works?

It’s always better to be proactive than reactive. Also while going through the logs you may find something else you want to start alerting for. Maybe you adding a new feature to your firewall or you added a print server and you want to setup alerting for those?

Hope you take out some time today and go through your logs, and if you’ve done that, do you have dashboards and/or alerting in place? If so, check those as well, and see if there is anyway you could improve it.

What scripts/modules/applications do you use to manage your event logs and/or create dashboards with?

Tagged With: 365, AD, PowerShell, Read-Only Friday, Reporting, Windows Server

Primary Sidebar

Clayton Tyger

Tech enthusiast dad who has lost 100lbs and now sometimes has crazy running/biking ideas. Read More…

Find Me On

  • Email
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter

Recent Posts

  • One-Liner Wednesday January 25, 2023
  • Module Monday January 23, 2023
  • One-Liner Wednesday January 18, 2023
  • Module Monday January 16, 2023
  • Read-Only Friday January 13, 2023

Categories

  • 365
  • Active Directory
  • Cim
  • Dashboards
  • Documentation
  • Get-WMI
  • Learning
  • Module Monday
  • Nutanix
  • One Liner Wednesday
  • Passwords
  • PDF
  • PowerShell
  • Read-Only Friday
  • Reporting
  • Security
  • Windows
  • WSUS

© 2023 Clatent