Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2020-08-13 04:15:41
Size: 631
Editor: PieterSmit
Comment:
Revision 5 as of 2020-08-13 21:12:41
Size: 1066
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
 * Get info on a machine by id {{{
#Powershell > import-module activedirectory
              Get-ADComputer -Identity "abcd" | select -ExpandProperty DistinguishedName
}}}
Line 9: Line 14:
 * Reason missing admin module
* Fix
   * http://blog.technotesdesk.com/active-directory-module-and-cmdlet-missing-upon-patching
     * RSAT tool https://www.microsoft.com/en-us/download/details.aspx?id=45520
   * Reason missing admin module {{{ get-module -listavailable }}}
  
* Fix
     * http://blog.technotesdesk.com/active-directory-module-and-cmdlet-missing-upon-patching
   * RSAT tool https://www.microsoft.com/en-us/download/details.aspx?id=45520
         * After install still got import error {{{
> import-module activedirectory
WARNING: Error initializing default drive: 'Unable to find a default server with Active Directory Web Services
running.'.
}}}

Windows/PowerShell Notes

Missing powershell commands

  • Get info on a machine by id

    #Powershell > import-module activedirectory
                  Get-ADComputer -Identity "abcd" | select -ExpandProperty DistinguishedName
  • Err

    > Get-ADComputer -Identity "abcd" | select -ExpandProperty DistinguishedName
    Get-ADComputer : The term 'Get-ADComputer' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1

Windows/PowerShell (last edited 2022-01-26 21:34:01 by PieterSmit)