95 questions
3
votes
1
answer
93
views
PowerShell Get-ADUser Published Certificates Import Error
I'm looking for some help with pulling certificate information from Active Directory. When I'm troubleshooting accounts, it can take a while to manually check each individual settings. One of the ...
-1
votes
1
answer
85
views
Powershell, combobox, get-aduser. Output users in color, depending on the condition
Please help me. How can I display a list of AD users in WinForm ComboBox in font color depending on the account status? For example: a disabled user is light gray, an unlimited password is blue.
$...
1
vote
1
answer
194
views
POWERSHELL : Get-AdUser as NT AUTHORITY AccountExpirationDate properties blank
As domain admin
get-aduser -Filter { GivenName
-like 'us')} -searchbase "DC=dom,DC=com" -properties * | Select SamAccountName, SurName, GivenName, @{Label='CurrentDate';Expression={get-date} ...
2
votes
1
answer
237
views
Variable not defined when trying to list a group of AD user from a CSV using Get-ADUser -Filter {displayName
I am using the below code to try and pull out a list of last logon times for a group of users contained in a CSV file. I have a test domain at home and the script below works fine. However, when I ...
1
vote
0
answers
869
views
Set-ADAccountPassword - The operation failed because of a bad parameter
I am writing a script to reset a ADusers password, through PowerShell
Set-ADAccountPassword -Identity TestA -Reset -NewPassword (ConvertTo-SecureString -AsPlainText $password -Force)
when I run the ...
1
vote
1
answer
200
views
Get AD Group Members - exclude computers
I have security groups with users and computers. I want to list ONLY the users within the security groups. I am getting the list of users but also getting an error for each computer in the security ...
1
vote
1
answer
346
views
Users with different permission getting different Get-ADUser Output
I am a bit lost here and don't know what to search for to make some progress. So maybe someone can help me out.
I am working in an already existing Active Directory, with already existing users, ...
0
votes
1
answer
2k
views
Powershell Get-ADUser fails for Date properties due to invalid Win32 FileTime
The below powershell command works for most of the accounts.
import-module activedirectory
Get-ADUser <account> -Properties *
For some accounts, I get following error
Get-ADUser : Not a valid ...
1
vote
2
answers
1k
views
PowerShell: Multiple ambiguous overloads found for "op_Subtraction" and the argument count: "2"
Trying to determine if AD accounts have been modified in the last 2 hours.
If I manually do a Get-ADUser and then compare $ObjDelta = ((Get-Date) - ($i.Modified)) I can successfully check the "...
0
votes
3
answers
348
views
get AD users inside the groups and subgroups of OU (not duplicated)
I want to get email address of all the users that are indirectly in one OU, in that OU there are groups and the groups members are sometimes groups and sometimes users (I need all the users in all ...
1
vote
3
answers
16k
views
Powershell - query all AD users and get their last login date
I would like to query all AD users and get the following attributes from each user:
SamAccountName, UserPrincipalName, LastLogonDate, Enabled, LockedOut, PasswordNeverExpires, CannotChangePassword, ...
1
vote
1
answer
405
views
System.OutOfMemoryException when running Get-Aduser on large data sets
The below script is considerably cut down in terms of the number of user properties being requested and there are approximately 50,000 users to iterate through. My previous approach was to first get a ...
0
votes
1
answer
2k
views
Powershell to read a list Usernames to show the AD group membership of each user and to output this to CSV file
I have a command that will display the AD group membership of a user:
Get-ADPrincipalGroupMembership username | select name
But I have to type each username for every user.
I was wondering if someone ...
0
votes
1
answer
1k
views
Powershell - I try to list computers that have a specific string in their description, but I'm unable to create a proper command
In my understanding I made a code that first lists computers with all their properties, then selects only the description property and after that it filters the computers whether they contain the ...
0
votes
1
answer
185
views
Removing the header in Powershell Export-Csv output for Select-Object
I'm outputting a list of members from an AD group to a csv file. Right now it's outputting with the header 'name'. I currently want to have the output without the header.
This is my code:
$groupNames =...