Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2020-08-13 04:15:41
Size: 631
Editor: PieterSmit
Comment:
Revision 6 as of 2020-08-16 22:05:15
Size: 1463
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
   * Load context {{{
foreach($server in (get-content 'C:\Downloads\pilot_dev_servers.txt')){Get-ADComputer -Identity $server | select -ExpandProperty DistinguishedName}
}}}
Line 4: Line 8:
 * e.g. get-content missing, search https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Management/Get-Content?view=powershell-7
   * its in {{{ Import-Module Microsoft.PowerShell.Management }}}

 * Get info on a machine by id {{{
#Powershell > import-module activedirectory
              Get-ADComputer -Identity "abcd" | select -ExpandProperty DistinguishedName
}}}
Line 9: Line 21:
 * 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

  • Load context

    foreach($server in (get-content 'C:\Downloads\pilot_dev_servers.txt')){Get-ADComputer -Identity $server | select -ExpandProperty DistinguishedName}

Missing powershell commands

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