Tag: PowerShell
-
PowerShell: Check computer last logon date
In a recently closed ticket, I had specified that the solution would be automatically applied upon reboot of a computer. As so often happens one of the twenty or so users affected by the solution emailed to say that it didn’t work. Having dealt with said user before, I had a hunch that they hadn’t […]
-
PowerShell: Pipe output to CSV file
Last week, I showed you how to get specific properties for all users in a given OU. Knowing that the output of that query quickly gets hard to navigate, wanting to remove the extraneous data that the customer didn’t request, and assuming that they wanted to manipulate the data, I decided to return the results […]
-
PowerShell: Getting properties for all user objects in a given OU
Two weeks ago, I showed you how I got some specific properties for a specific user. Perhaps unsurprisingly, the next request from my customer was a similar dump from a specific OU. While the Identity parameter works well when you’re dealing with a specific user, it doesn’t help when you want all users.
-
Powershell: Retrieving all properties for a given user object
I was asked to provide an overview of all available properties in an Active Directory user object for an upcoming project. As it turns out, that is very easily accomplished. Unsurprisingly, PowerShell has an applet for this. We use the Get-ADUser applet, with the parameters Identity to identify the user in question and Properties with […]
-
PowerShell: Building a script to find all members of several given groups
Last week, I showed you how I find all the nested members of a specified group. When we get requests for such audits, however, they usually specify doing so for a number of groups. Now, we could of course do it, one group at a time, adding information to our output as we go, however […]
-
Building a script to find all members of a given group
Some time ago, I was asked to provide a list of everyone with access to a specific system. After communicating with the client, it transpired that they were particularly interested in knowing who were the members of a set of Active Directory groups. While this can be done manually, I wanted to try my hand […]
-
How to run a PowerShell script
As has been the case so many times before, this week I’m bringing you the direct result of a customer request. The customer in question needed to know how to run a .ps1 script. As you may or may not know, double-clicking the script defaults to editing the script. At any rate, here’s how you […]
-
Exporting AD group members’ display name
Five years ago, I showed you how to export a list of members of an Active Directory group, using a command line query. One issue I’ve run into using this query, is that I get their user name, not their actual name, which tends to make the resulting list hard to parse. As I had […]
-
Powershell: Exporting Active Directory Contacts
Some time ago, I needed to have a list of all Contacts registered in Active Directory. Knowing that there are a lot of them (numbering at least eighty), getting the data manually was not a viable alternative, particularly knowing that the same objective can be achieved through Powershell. I eventually came up with a solution. […]
-
List user home folder size
Users tend to store all kinds of crud on their network home folders, which can be a constant source of frustration for SysAdmins. Luckily, it is fairly easy to get a list of the size of each folder, using a Powershell script. The script has already been made for us. It is discussed in detail here, and can […]
-
Exporting a list of a given users group memberships from Active Directory
A while back, I showed you how to export a list of all members of a group, as well as all computers, from Active Directory. On a related note, here’s how to export all group memberships held by a single user: