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

Clatent

Technology | Fitness | Food

  • About
  • Resources
  • Contact

PowerShell

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

Read-Only Friday Nov 11, 2022

November 11, 2022 by ClaytonT Leave a Comment

With today being a holiday, and more holidays coming up in the last days of the year, send out reminders to your users to keep be extra careful when clicking on links. Attacks have been more minor so far this year, which makes me feel it’s going to ramp up shortly. For the parents, think of it when your child is quiet for too long by themselves… it usually means they are planning something or doing something they shouldn’t be doing. That’s how I feel about bad actors currently.

  • A few things to remind them:
    • Do you normally get emails from that company service? (ie UPS, FedEx, PayPal, etc)
      • If not, don’t open it, and definitely don’t click on links or download an attachment
    • Does that person normally send you links to click on? If they do, are they the type the current email is asking you to open?
      • I’ve seen it before when a company you normally work with gets compromised so spam/virus/malware protection doesn’t pick it up as it is coming from a real email, but the bad actor over took that users account and is sending links/attachments from it.
    • Is the email the real identities email?
      • I know the name says it’s your president or CFO, but what is the real email sending it? It can be tougher seeing it quickly on a mobile device, but have them double check. Have them check those headers.
    • Don’t respond to the email
      • When responding, you are showing them that the account is live, and they will keep on attempting to compromise that email address.
    • If it looks real, contact the person/company from known number
      • If the email looks mostly real, but they don’t normally send you links, call the person/company from a known number. Nothing from that current email. If you normally contact them check previous emails or ask a coworker if they have a direct number. I would say check their website, but that could be compromised as well, so not always the best spot to get their number.

I’m sure all of these are pretty common, but it’s a great reminder for your users, especially with the end of the year rush starts happening.

What are some tips you would give to your end users?

Tagged With: PowerShell, Read-Only Friday, Security

One-Liner Wednesday Nov 9, 2022

November 9, 2022 by ClaytonT Leave a Comment

This is an oldie, but a goodie…

Unlock-ADAccount -Identity "UserName"

If you haven’t used this, and didn’t know it existed, definitely add it to your tool box. It’s so much easier than having to go into the GUI to do this.

A nice future script you could have this in is if you have multiple users get locked out, that you could pipe Get-ADUser for the group you want and filter it so only disabled show and either unlock all of them, or pipe it to Out-GridView with passthrough. This would give you a nice gridview of the users and the ones you select from it would be disabled.

Tagged With: AD, One Liner Wednesday, PowerShell, Windows Server

Module Monday November 7, 2022

November 7, 2022 by ClaytonT Leave a Comment

It’s Monday…..

So here is a new module for today! This one is actually expanding on one liner Wednesday form last week.

This module is called “Password Solution” which allows you to easily search, review, and email users, managers, and IT about passwords expiring. You can even create specific  templates to send out to depending on who is receiving it. He make makes it so easy, it makes it tough for a reason not to have something like this in place!

Another great feature is the dashboard that he provides you, which saves you a lot of time trying to make your own from the one liner last week.

PowerShell Gallery:
PasswordSolution/0.0.29

Tagged With: AD, Module Monday, PowerShell

Read-Only Friday November 4, 2022

November 4, 2022 by ClaytonT Leave a Comment

It’s Friday, and today I have some great resources to keep you from doing any major unplanned changes to your network today.

Have you heard of Matthew Dowst? I hadn’t until I listened to the PowerShell Podcast on Monday. He is the man behind PS Weekly. If you haven’t heard of it, check it out in the links below. It’s a weekly recap of great PowerShell finds that he has put together.

And even better, he has a book out now(in MEAP form) that will be finished in 2023, called Practical Automation with PowerShell. I’ve already taken a quick look at it, and will be picking it up too.

Definitely check out both as well as the PowerShell Podcast if you haven’t already

PSWeekly:
PowerShell Weekly

Practical Automation with PowerShell:
Practical Automation with PowerShell

PowerShell Podcast:
PowerShell Podcast

Tagged With: Books, Podcast, PowerShell, Read-Only Friday

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 15
  • Page 16
  • Page 17
  • Page 18
  • Page 19
  • Page 20
  • 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

  • New EntraFIDOFinder Module Version Release!
  • Did you know there is a Giphy rating in Teams? Custom Maester Tests save the day
  • Learning ValidateSet in PowerShell: Valid Values Only
  • Teams Chat and PowerShell – How to add value!
  • EntraFIDOFinder: New Web UI and Over 70 New Authenticators

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

imunify-bot-check