Verify the Logid status
-
I am having 1500 Active Directory user details need to verify whether it is enabled or disabled
-
I am having the excel file to compare the active status of the Active Directory account.Whether any powershell is there ?
-
@scottalanmiller any powershell is there to check on the same?I have checked this as a solution but the output is not coming on the same
-
I think that this is the cmdlet that you want to use: Search-ADAccount -AccountDisabled
-
Or try...
Get-ADUser -Filter (enabled -ne $true)
-
@scottalanmiller said in Verify the Logid status:
I think that this is the cmdlet that you want to use: Search-ADAccount -AccountDisabled
I need to compare the same with my .csv file for the status
-
@lakshmana said in Verify the Logid status:
@scottalanmiller said in Verify the Logid status:
I think that this is the cmdlet that you want to use: Search-ADAccount -AccountDisabled
I need to compare the same with my .csv file for the status
That's dramatically more complicated. And is completely dependent on the format of your CSV. Probably best to get PowerShell to output to text, then use a text processor to compare the two.
-
@scottalanmiller said in Verify the Logid status:
@lakshmana said in Verify the Logid status:
@scottalanmiller said in Verify the Logid status:
I think that this is the cmdlet that you want to use: Search-ADAccount -AccountDisabled
I need to compare the same with my .csv file for the status
That's dramatically more complicated. And is completely dependent on the format of your CSV. Probably best to get PowerShell to output to text, then use a text processor to compare the two.
Is there a Way only to compare my .csv file to get the AD account status (Enabled or Disabled ) ?
-
@scottalanmiller said in Verify the Logid status:
I think that this is the cmdlet that you want to use: Search-ADAccount -AccountDisabled
This fetching whole details from the Windows Server.
-
@lakshmana said in Verify the Logid status:
@scottalanmiller said in Verify the Logid status:
I think that this is the cmdlet that you want to use: Search-ADAccount -AccountDisabled
This fetching whole details from the Windows Server.
Isn't that needed? How do you do the compare if you don't have that list?
-
@scottalanmiller I don't need whole list but need to get the details of my 1500 User Id only.I just need information regarding whether its enabled or disabled ?.Whether this link helps
-
When i am trying to export the file
cmdlet Export-Csv at command pipeline position 1
Supply values for the following parameters:
InputObject:What i need to input here what is this for ?
-
This link gives some idea but need to update the details through this command how to do this ?
(Get-ADUser -Identity Username -Properties Enabled).Enabled
-
how to check from the .csv
https://community.spiceworks.com/topic/1941706-script-to-see-if-users-in-text-file-are-disabled?
-
$file="c:\users.csv"
Import-Csv $file | Foreach-Object{$user = ([ADSISEARCHER]"(samaccountname=$($_.SamAccountName))").FindOne() if($user) { New-Object -TypeName PSObject -Property @{ SamAccountName = $user.SamAccountName IsDisabled = $user.GetDirectoryEntry().InvokeGet('AccountDisabled') } } else { Write-Warning "Can't find user '$($_.SamAccountName)'" }
}
I have only Username details how to run this script ?
-
I don't have a system here to test against, I'm afraid.
-
@lakshmana said in Verify the Logid status:
@scottalanmiller I don't need whole list but need to get the details of my 1500 User Id only.I just need information regarding whether its enabled or disabled ?.Whether this link helps
Oh, only one user? Why not check ID 1500 manually then?
-
@scottalanmiller said in Verify the Logid status:
@lakshmana said in Verify the Logid status:
@scottalanmiller I don't need whole list but need to get the details of my 1500 User Id only.I just need information regarding whether its enabled or disabled ?.Whether this link helps
Oh, only one user? Why not check ID 1500 manually then?
Need to confirm True or False from AD all the 1500 Users in the .Csv file
-
@lakshmana said in Verify the Logid status:
@scottalanmiller said in Verify the Logid status:
@lakshmana said in Verify the Logid status:
@scottalanmiller I don't need whole list but need to get the details of my 1500 User Id only.I just need information regarding whether its enabled or disabled ?.Whether this link helps
Oh, only one user? Why not check ID 1500 manually then?
Need to confirm True or False from AD all the 1500 Users in the .Csv file
I'm confused. You need which 1500 users?
-
@scottalanmiller said in Verify the Logid status:
@lakshmana said in Verify the Logid status:
@scottalanmiller said in Verify the Logid status:
@lakshmana said in Verify the Logid status:
@scottalanmiller I don't need whole list but need to get the details of my 1500 User Id only.I just need information regarding whether its enabled or disabled ?.Whether this link helps
Oh, only one user? Why not check ID 1500 manually then?
Need to confirm True or False from AD all the 1500 Users in the .Csv file
I'm confused. You need which 1500 users?
@scottalanmiller said in Verify the Logid status:
@lakshmana said in Verify the Logid status:
@scottalanmiller said in Verify the Logid status:
@lakshmana said in Verify the Logid status:
@scottalanmiller I don't need whole list but need to get the details of my 1500 User Id only.I just need information regarding whether its enabled or disabled ?.Whether this link helps
Oh, only one user? Why not check ID 1500 manually then?
Need to confirm True or False from AD all the 1500 Users in the .Csv file
I'm confused. You need which 1500 users?
Actually I am having .csv with 1500 Username and i need to check the same username with the AD for the Disabled status.How to do with the above powershell command ?