ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Verify the Logid status

    Scheduled Pinned Locked Moved IT Discussion
    active directorywindowspowershellsearch-adaccount
    35 Posts 2 Posters 2.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      Or try...

      Get-ADUser -Filter (enabled -ne $true)
      
      1 Reply Last reply Reply Quote 0
      • LakshmanaL
        Lakshmana @scottalanmiller
        last edited by

        @scottalanmiller

        @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

        scottalanmillerS 1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller @Lakshmana
          last edited by

          @lakshmana said in Verify the Logid status:

          @scottalanmiller

          @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.

          LakshmanaL 1 Reply Last reply Reply Quote 0
          • LakshmanaL
            Lakshmana @scottalanmiller
            last edited by

            @scottalanmiller

            @scottalanmiller said in Verify the Logid status:

            @lakshmana said in Verify the Logid status:

            @scottalanmiller

            @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 ) ?

            1 Reply Last reply Reply Quote 0
            • LakshmanaL
              Lakshmana @scottalanmiller
              last edited by

              @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.

              scottalanmillerS 1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @Lakshmana
                last edited by

                @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?

                LakshmanaL 1 Reply Last reply Reply Quote 1
                • LakshmanaL
                  Lakshmana @scottalanmiller
                  last edited by Lakshmana

                  @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

                  http://community.idera.com/powershell/ask_the_experts/f/active_directory__powershell_remoting-9/20099/ad-accounts-disabled-enabled-query

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • LakshmanaL
                    Lakshmana
                    last edited by

                    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 ?

                    1 Reply Last reply Reply Quote 0
                    • LakshmanaL
                      Lakshmana
                      last edited by

                      This link gives some idea but need to update the details through this command how to do this ?

                      https://social.technet.microsoft.com/Forums/Lync/en-US/f9b86610-7dbb-49ed-90a0-1b319ac07241/question-on-getaduser-and-properties?forum=winserverpowershell

                      (Get-ADUser -Identity Username -Properties Enabled).Enabled

                      1 Reply Last reply Reply Quote 0
                      • LakshmanaL
                        Lakshmana
                        last edited by

                        how to check from the .csv

                        https://community.spiceworks.com/topic/1941706-script-to-see-if-users-in-text-file-are-disabled?

                        1 Reply Last reply Reply Quote 0
                        • LakshmanaL
                          Lakshmana
                          last edited by

                          $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 ?

                          1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller
                            last edited by

                            I don't have a system here to test against, I'm afraid.

                            1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @Lakshmana
                              last edited by

                              @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

                              http://community.idera.com/powershell/ask_the_experts/f/active_directory__powershell_remoting-9/20099/ad-accounts-disabled-enabled-query

                              Oh, only one user? Why not check ID 1500 manually then?

                              LakshmanaL 1 Reply Last reply Reply Quote 1
                              • LakshmanaL
                                Lakshmana @scottalanmiller
                                last edited by

                                @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

                                http://community.idera.com/powershell/ask_the_experts/f/active_directory__powershell_remoting-9/20099/ad-accounts-disabled-enabled-query

                                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

                                scottalanmillerS 1 Reply Last reply Reply Quote 0
                                • scottalanmillerS
                                  scottalanmiller @Lakshmana
                                  last edited by

                                  @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

                                  http://community.idera.com/powershell/ask_the_experts/f/active_directory__powershell_remoting-9/20099/ad-accounts-disabled-enabled-query

                                  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?

                                  LakshmanaL 1 Reply Last reply Reply Quote 0
                                  • LakshmanaL
                                    Lakshmana @scottalanmiller
                                    last edited by

                                    @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

                                    http://community.idera.com/powershell/ask_the_experts/f/active_directory__powershell_remoting-9/20099/ad-accounts-disabled-enabled-query

                                    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

                                    http://community.idera.com/powershell/ask_the_experts/f/active_directory__powershell_remoting-9/20099/ad-accounts-disabled-enabled-query

                                    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 ?

                                    scottalanmillerS 1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller @Lakshmana
                                      last edited by

                                      @lakshmana said in Verify the Logid status:

                                      @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

                                      http://community.idera.com/powershell/ask_the_experts/f/active_directory__powershell_remoting-9/20099/ad-accounts-disabled-enabled-query

                                      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

                                      http://community.idera.com/powershell/ask_the_experts/f/active_directory__powershell_remoting-9/20099/ad-accounts-disabled-enabled-query

                                      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 ?

                                      Is the username 1500? You keep saying "1500 Username" but this phrase doesn't mean anything to me.

                                      Do you mean "1500 usernames", meaning 1,500 different usernames? Or do you mean someone whose username is 1500? And if 1,500 usernames, why so many, but not all?

                                      LakshmanaL 1 Reply Last reply Reply Quote 0
                                      • LakshmanaL
                                        Lakshmana @scottalanmiller
                                        last edited by

                                        @scottalanmiller 1500 Numbers of Different Usernames

                                        scottalanmillerS 1 Reply Last reply Reply Quote 0
                                        • scottalanmillerS
                                          scottalanmiller @Lakshmana
                                          last edited by

                                          @lakshmana said in Verify the Logid status:

                                          @scottalanmiller 1500 Numbers of Different Usernames

                                          Okay, then write it like this.... 1,500 usernames. The comma, the capital letter, the lack of plural ending all indicate something other than you were intending.

                                          Now that we have an idea of what we are trying, which 1,500 as it is not all that are in the file? How do we determine which 1,500?

                                          LakshmanaL 1 Reply Last reply Reply Quote 0
                                          • LakshmanaL
                                            Lakshmana
                                            last edited by

                                            The .csv file have Serial Number staring from 1-1500 numbers where the usernames are mentioned where i need to check whether it is disabled or not from AD

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post