This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| informatique:windows:powershell [2025/01/23 14:58] – yahiko | informatique:windows:powershell [2025/08/12 13:20] (current) – yahiko | ||
|---|---|---|---|
| Line 133: | Line 133: | ||
| </ | </ | ||
| - | ===== Lister les membres | + | ===== Groupes AD ===== |
| + | ==== Lister les groupes d'une OU ==== | ||
| + | <code powershell> | ||
| + | Get-AdGroup -filter * -searchbase " | ||
| + | </ | ||
| + | |||
| + | ==== Lister les utilisateurs | ||
| <code powershell> | <code powershell> | ||
| Get-ADGroupMember -Identity " | Get-ADGroupMember -Identity " | ||
| </ | </ | ||
| + | ===== Vérifier les droits NTFS d'un dossier ===== | ||
| + | |||
| + | Non récursif. | ||
| + | |||
| + | <code powershell> | ||
| + | Get-NTFSAccess ' | ||
| + | |||
| + | Path: D: | ||
| + | |||
| + | |||
| + | Account | ||
| + | ------- | ||
| + | BUILTIN\Administrateurs | ||
| + | BUILTIN\Administrateurs | ||
| + | AUTORITE NT\Système | ||
| + | CREATEUR PROPRIETAIRE | ||
| + | BUILTIN\Utilisateurs | ||
| + | BUILTIN\Utilisateurs | ||
| + | BUILTIN\Utilisateurs | ||
| + | </ | ||
| + | |||
| + | ===== Lister les utilisateurs connectés en RDP ===== | ||
| + | |||
| + | <code powershell> | ||
| + | Get-CimInstance -ClassName Win32_UserProfile | where {-not $_.Special} | select LocalPath, LastUseTime, | ||
| + | </ | ||
| + | |||
| + | Source : https:// | ||
| + | |||
| + | |||
| + | ===== Uptime ===== | ||
| + | |||
| + | <code powershell> | ||
| + | (get-date) – (gcim Win32_OperatingSystem).LastBootUpTime | ||
| + | </ | ||