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

Clatent

Technology | Fitness | Food

  • About
  • Resources
  • Contact

PowerShell

Read-Only Friday November 25, 2022

November 25, 2022 by ClaytonT Leave a Comment

I know a lot of US workers have off today, but still wanted to post something as I know there are still many working and others who may have a little extra free time for learning. For today’s ROF, it really is a module or should I say modules, but the solution from these modules could be so helpful, I didn’t want someone to miss it.

The creator is called AsBuiltReport, which they have designed As Built Reports for different software and systems which you can customize what you want to see on the report and what thresholds should be for pass/fail.

Another way I could see using this to do to monthly/weekly/daily checks on your systems, and see if anything has been changed, but not only that, for certain(or all) systems it automatically changes back to the standard settings that it should be.

GitHub:

https://github.com/AsBuiltReport

Tagged With: AD, Fortinet, Nutanix, PowerShell, Read-Only Friday, Reporting, VMWare, Windows Server

One-Liner Wednesday November 23, 2022

November 23, 2022 by ClaytonT Leave a Comment

As we are approaching the holiday season  at the end of the year, dates are very important. Everything from counting down the days to the new year to creating those end of the year reports.

With that said, how many times have you had to create a report for the previous month, but it’s  parameters are only StartDate and EndDate? Now, you have to remember how many days are in that month and consider if it’s a leap year or not. And sometimes the first of the month is on a weekend, Holiday, or a day you took PTO so you have to make sure your code doesn’t just go back 30 days as then it may or may not get the whole previous month.  And let’s say for reasons you can’t control,  you can’t have it as a scheduled task to always run on the first of the month?

This one liner(technically 2 one for StartDate and one for EndDate), is the solution you need. It will check which month your in, go to the previous month then find the first and last day of that month. That’s it!

$StartDate = (Get-Date -Day 1).AddMonths(-1).ToString("yyyy-MM-dd")

$EndDate = (Get-Date -Day 1).AddDays(-1).ToString("yyyy-MM-dd")

If you wanted the past 6 months you could change the -1 to -6 in Start Date. Now you don’t have to manually enter the month date range every time you need a report for the previous month. You could set this as the default parameter, but give yourself the option to change it if you need a different date range.

Documentation:

Get-Date:
Microsoft Learn

Tagged With: Get-Date, One Liner Wednesday, PowerShell, Reporting

Module Monday November 21, 2022

November 21, 2022 by ClaytonT Leave a Comment

Since I know everyone knows about Microsoft’s Hyper-V PowerShell, and I’ve mentioned about VMWare’s here, I didn’t want to leave out Nutanix’s PowerShell module for those that use Nutanix. I personally haven’t used this one, but the documentation looks great for it, and you can definitely automate a lot of the processes instead of having to go into the GUI. I’d also recommend creating standard templates of how settings should be for hosts and VM’s which you could then compare with how yours are setup, so you can quickly see what has changed. This is great for a few reasons. 1) You have a base working config saved for future deployments 2) If a bad actor gets in and slowly starts changing things you can catch it 3) You can create reports based off this data.

And if you looking for a great “As Built” Report for your Nutanix, check out the link below where they have created a detailed report with the ability to highlight concerning areas from just running one script!

Nutanix CLI:
PowerShell Gallery

As Built Report – Nutanix
PowerShell Gallery – As Built Report Nutanix

Tagged With: Automation, Hypervisor, Nutanix, PowerShell, Reporting

Read-Only Friday November 18, 2022

November 18, 2022 by ClaytonT Leave a Comment

It’s coming to the end of the year and only a handful more ROF for this year, which can also mean agreements and renewals for a lot of people. How do you manage them? Do you have dedicated software, excel, sharepoint, SQL, or something else?

Do you have any automation built in for reminders to bring up to management, reminders for yourself, and/or request quotes from vendors? And yes I said for yourself, who enjoys renewing software then realizing you didn’t put in the new license and everything stops..

Going a little deeper, what about  cost wise? Do you have it so you can see upcoming costs and expected costs for the year. I know not all organizations are lucky enough to have enterprise grade software and/or dedicated departments to manage all of this. For smaller organizations, it can easily start out as an excel/sharepoint/google sheet and grow into local/cloud SQL or other scaleable solution. If you start now though, you’ll know what you want and don’t want which will make selecting solutions much easier. And from my years in the industry I can tell you that even with enterprise grade software you will still need to do some custom integrations, just a lot less of them.

Tagged With: Documentation, PowerShell, Read-Only Friday, Reporting

One-Liner Wednesday November 16, 2022

November 16, 2022 by ClaytonT Leave a Comment

Always love when you get surprised by printer issues? Here is a one liner that in its current state works great, but can be expanded on to be even more powerful, or gives you an idea to go more in depth.

 invoke-command -computername ServerName -credential YourUser  -scriptblock {get-printer | select-object name, printerstatus, portname}

This code will connect to your print server or user computer and check all printers installed and their status. It’s not limited to one computer for situations where you have multiple printer servers or need to check on multiple user computers. It will even show when toner and paper jams. Wouldn’t it be nice to see if the user is even connected to the printer they are trying to print to or if the printer is saying there is a paper jam?

To go a step farther, you could set this up as a scheduled task or have it monitor, and send a toast notification, create a ticket depending on the error, or send a chat message to your teams/discord/slack channel. To go even more granular, you could connect to the printer’s API and check toner levels, and have it order that toner when it hits the pre-determined threshold.

Hoping this little one liner helps out, and gives you some more ideas on how you can expand on it, to make your lives easier. If you have a related script, please post it in the comments for more ideas.

PowerShell Help:
Get-Printer

Tagged With: One Liner Wednesday, PowerShell, Print Management

Module Monday November 14, 2022

November 14, 2022 by ClaytonT Leave a Comment

I’ll just cut to the chase on this one.. Whose tired of patching windows computers?

Here is a great tool to make it much less painful…

Welcome Chrissy Lemaire’s KBUpdate. This module will allow you to patch your computer, workstations, and servers. They don’t even need to be online either, as you can save the updates to a USB, DVD, or a network path.

A really cool feature is you can force it to where to look for the updates as well.

And this isn’t just for installing, you are able to remove updates as well.

Hope this saves you as much time as it has me!

PowerShell Gallery:
kbupdate/2.0.18

GitHub:
kbupdate

Tagged With: Module Monday, PowerShell, Windows Server, WSUS

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 14
  • Page 15
  • Page 16
  • Page 17
  • Page 18
  • Page 19
  • Go to Next Page »

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

  • Learning ValidateSet in PowerShell: Valid Values Only
  • Teams Chat and PowerShell – How to add value!
  • EntraFIDOFinder: New Web UI and Over 70 New Authenticators
  • January 19, 2026 Updates to EntraFIDOFinder
  • v0.0.20 EntraFIDOFinder is out

Categories

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

© 2026 Clatent