Category: Windows Stuff

Use PowerShell to get Service Auto-Start Status Along with Human Readable Service Name

Use PowerShell to get Service Auto-Start Status Along with Human Readable Service Name

This falls into the “Come on Microsoft” category.

I have been writing a script that will gather a bunch of information from servers, and returns an object with the information.  Part of what I’m gathering is the servers that are set to auto start, and have their corresponding service stopped.

While you can get a list of services that meet part of this criteria like this:

Continue reading “Use PowerShell to get Service Auto-Start Status Along with Human Readable Service Name”

Use PowerShell to Update Specific AD User’s Description Field with Last Login Time

Use PowerShell to Update Specific AD User’s Description Field with Last Login Time

I encountered a challenge today that was fun to fix.  There’s an Organizational Unit in my AD setup that has historically been used to store disabled AD objects instead of deleting them.

When an employee leaves the organization, our standard procedure  is as followed:

  1. Disable User Object
  2. Move to separate OU (IE AD://internal.msd/disabled/users)
  3. Update Description field with something like: Disabled by [username] on [date]
  4. Retain user object for x amount of days, then tombstone it.

Best laid plans of mice and men… yada yada…

Continue reading “Use PowerShell to Update Specific AD User’s Description Field with Last Login Time”

Copyright VirtJunkie.com © 2024