PS C:\Users\mkana> get-service LanmanServer | get-member I can look at the MemberType column and see all the properties available. Let's try piping get-service to get-member and see if there are additional properties available to me. I see there are ComputerName and DisplayName fields which can be helpful, but nothing that gives me ' Logon As' or ' Run As'. Gets the services on a local or remote computer. I'll start with a simple help lookup: PS C:\Users\mkana> help get-service Let's start by querying a service on my local computer to see what fields are available. The first thing we'll need to figure out is a way to find the "logon as" properties for services on Windows computer. (implied but not said) format the output of the results so that we can understand the information.find all the services configured to run as another user."Find all the services configured to run as another user on a group of servers."įrom that sentence, we can break that down to these separate tasks to solve: Let's dive in and look at how I solved this request.įirst, let's review the task and break it down into relevant pieces: My manager hadn't even finished his sentence, and I had already thought in my head, "No problem! I'll crank that out in PowerShell in a mere couple of minutes!" The ask was benign, but as I soon found out, the process for discovering the requested information was not as straightforward as I thought. "Hey Mike, can you find all the services configured to run as another user on a specific group of servers?" One day at work my manager asked me to find all services running under different credentials on a handful of a specific servers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |