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

Clatent

Technology | Fitness | Food

  • About
  • Resources
  • Contact

Windows Server

Read-Only Friday January 13, 2023

January 13, 2023 by ClaytonT 2 Comments

Today’s Read-Only Friday is about retiring/upgrading servers. Don’t worry no changing code today, but with Server 2012R2 going end of support Oct 10, 2023, I want to make sure you are aware and prepared to do it. By no means is this the definitive guide to do it, but hope this helps you create or improve your process for upgrading servers. Right now, I’d put a reminder in your calendar so you don’t forget and that you have enough time to take action on those servers.

I know it will depend greatly on what is on the server, but first thing before doing anything is making sure you have a valid backup. I’m not just talking about that your backup server of choice says it backed it up successfully, but actually restoring the server/files needed from the backup to ensure it works. We are decommissioning it for a reason, but while going through the process we want to make sure we have a backup just in case.

Next, I’d go through the server and make sure all services/software are documented as well as any important files. Even if you have documentation, I’d double check that all of it is correct, and that someone didn’t go out of scope and install something on it without documenting it. The last thing you need is when you shutdown the server or setup the replacement server that a department can’t do their work because the product they need isn’t online anymore.

A PowerShell one liner I’d recommend is “Get-WindowsFeature | Where installed” for one computer or you could run “Get-WindowsFeature -computername serv01,serv02 | Where installed” then you could pipe it to CSV or Excel to make it easier for documentation.

Then to get all programs installed

$InstalledSoftware = Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall"

foreach($obj in $InstalledSoftware){write-host $obj.GetValue('DisplayName') -NoNewline; write-host " - " -NoNewline; write-host $obj.GetValue('DisplayVersion')}

This can be exported as well for easier documention as well.

Now that we know we have good back ups, we know what services/applications installed, and we did a once over for any out scope configs, I would ask your team to look over what you have to make sure nothing was missed. The more you do these, the less time it will take, but it’s always good to have a second set of eyes on it.

Great, with it having a second set of eyes on it, we can now build the new machine. Depending on your virtualization platform(Hoping you a test environment, if not look at AutomatedLabs), I’d create a PowerShell script to build the server, or if you have templates already, I’d use PowerShell to make the copy then configure IP and any one off applications and servers, as well as any files that would need to be on it. Make sure all windows updates are done to ensure none of them will break it. Once you have confirmed everything is working on the newer server os, you can now deploy it to production(Make sure to turn off the old one if it will cause issues). Before deploying it to production, I’d send out communication to users in case for some reason there is an issue, they will let you know right away or if there is anything they have to do on their side.

At this point I’d put all of the documentation for the new server together if you haven’t already which should be easy, as most of it is right in scripts. Once the new server has been working for a safe amount of time as it will depend on the importance of server, you can remove the old server and test server from your host(s).

I could definitely go in more depth on this, and if you have any questions on checklists or what to actually keep for documentation, let me know and I’d be glad to help out.

And yes, I know this is a Read-Only Friday topic, but most of the hard work is on the planning/documenting side which you can do on Read-Only Friday.

Tagged With: Automation, Documentation, EOL, PowerShell, Read-Only Friday, Upgrading, Windows Server

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 December 14, 2022

December 14, 2022 by ClaytonT Leave a Comment

Ever have to migrate a share? Or see who is still accessing a share you need to do work on and want to make sure everyone is off of it so the user doesn’t lose any data? Here is the perfect one liner.

Get-wmiobject -computername ServerName win32_serverconnection | select-object sharename,username,computername

All you have to do is put your Server name in and then this will show all shares that users are connected to with their computer name. You could run it right on your server you want to check the shares on as well. This has been super helpful when doing maintenance and when we’ve had to migrate storage to different servers/locations.

Microsoft Learn:
Get-wmiobject

Tagged With: One Liner Wednesday, PowerShell, Windows Server

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

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

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

  • Go to page 1
  • Go to page 2
  • 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

  • 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