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 do it:
Tag: PowerShell
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 a need to export a relatively large number of group members names as part of a recent ticket, I needed a solution that gave me what I wanted straight out of the box.
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. To make following it logically easier, I’m going to include commentary on each step:
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 be downloaded from here. You could do this from your local computer, or by remote desktop to the remote computer. The procedure is the same.
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: