Meilleur auteur de réponses
Partage de fichiers

Question
-
Bonjour,
On me demande de lister tous les repertoires et sous-repertoires contenu dans un repertoire partagé, avec le nom des groupes/personnes y accédants et leurs droits.
Comment puis-je faire sans naviguer à la main dans l'arborescence, il y a 1400 repertoires ?
Merci
MLHvendredi 14 mai 2010 13:54
Réponses
-
Bonjour,
Je te conseil de déployer le PowerShell sur ton serveur (si il n'y est pas déjà)
Et là tu démarre la console et tu tappe ceci :
dir \\SERVER\share -recurse | Where-Object { $_.PSIsContainer } | ForEach-Object { $_.FullName } | Get-Acl | Format-List >> c:\test3.txt
Et je renvoie le résultat dans un fichier : C:\test3.txt
Par exemple dans mon cas j'ai executé :
dir \\P7-PGA\c$ -recurse | Where-Object { $_.PSIsContainer } | ForEach-Object { $_.FullName } | Get-Acl | Format-List >> c:\test3.txt
Et ça me retourne ceci :
Path : Microsoft.PowerShell.Core\FileSystem::\\P7-PGA\c$\Applications
Owner : BUILTIN\Administrateurs
Group : P7-PGA\None
Access : BUILTIN\Administrateurs Allow FullControl
BUILTIN\Administrateurs Allow 268435456
AUTORITE NT\Système Allow FullControl
AUTORITE NT\Système Allow 268435456
BUILTIN\Utilisateurs Allow ReadAndExecute, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow Modify, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow -536805376
Audit :
Sddl : O:BAG:S-1-5-21-2592982558-1610811037-614518526-513D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICII
OID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)Path : Microsoft.PowerShell.Core\FileSystem::\\P7-PGA\c$\Applications\Citrix Xen App
Owner : BUILTIN\Administrateurs
Group : P7-PGA\None
Access : BUILTIN\Administrateurs Allow FullControl
BUILTIN\Administrateurs Allow 268435456
AUTORITE NT\Système Allow FullControl
AUTORITE NT\Système Allow 268435456
BUILTIN\Utilisateurs Allow ReadAndExecute, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow Modify, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow -536805376
Audit :
Sddl : O:BAG:S-1-5-21-2592982558-1610811037-614518526-513D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICII
OID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)Path : Microsoft.PowerShell.Core\FileSystem::\\P7-PGA\c$\Applications\PDF
Owner : BUILTIN\Administrateurs
Group : P7-PGA\None
Access : BUILTIN\Administrateurs Allow FullControl
BUILTIN\Administrateurs Allow 268435456
AUTORITE NT\Système Allow FullControl
AUTORITE NT\Système Allow 268435456
BUILTIN\Utilisateurs Allow ReadAndExecute, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow Modify, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow -536805376
Audit :
Sddl : O:BAG:S-1-5-21-2592982558-1610811037-614518526-513D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICII
OID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)Cordialement,
Philippe GAZAGNE Consultant Infrastructure & Réseaux- Proposé comme réponse Philippe Gazagne lundi 17 mai 2010 16:06
- Marqué comme réponse Roxana PANAITMicrosoft employee mardi 18 mai 2010 08:31
samedi 15 mai 2010 09:43
Toutes les réponses
-
Bonjour,
Je te conseil de déployer le PowerShell sur ton serveur (si il n'y est pas déjà)
Et là tu démarre la console et tu tappe ceci :
dir \\SERVER\share -recurse | Where-Object { $_.PSIsContainer } | ForEach-Object { $_.FullName } | Get-Acl | Format-List >> c:\test3.txt
Et je renvoie le résultat dans un fichier : C:\test3.txt
Par exemple dans mon cas j'ai executé :
dir \\P7-PGA\c$ -recurse | Where-Object { $_.PSIsContainer } | ForEach-Object { $_.FullName } | Get-Acl | Format-List >> c:\test3.txt
Et ça me retourne ceci :
Path : Microsoft.PowerShell.Core\FileSystem::\\P7-PGA\c$\Applications
Owner : BUILTIN\Administrateurs
Group : P7-PGA\None
Access : BUILTIN\Administrateurs Allow FullControl
BUILTIN\Administrateurs Allow 268435456
AUTORITE NT\Système Allow FullControl
AUTORITE NT\Système Allow 268435456
BUILTIN\Utilisateurs Allow ReadAndExecute, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow Modify, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow -536805376
Audit :
Sddl : O:BAG:S-1-5-21-2592982558-1610811037-614518526-513D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICII
OID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)Path : Microsoft.PowerShell.Core\FileSystem::\\P7-PGA\c$\Applications\Citrix Xen App
Owner : BUILTIN\Administrateurs
Group : P7-PGA\None
Access : BUILTIN\Administrateurs Allow FullControl
BUILTIN\Administrateurs Allow 268435456
AUTORITE NT\Système Allow FullControl
AUTORITE NT\Système Allow 268435456
BUILTIN\Utilisateurs Allow ReadAndExecute, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow Modify, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow -536805376
Audit :
Sddl : O:BAG:S-1-5-21-2592982558-1610811037-614518526-513D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICII
OID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)Path : Microsoft.PowerShell.Core\FileSystem::\\P7-PGA\c$\Applications\PDF
Owner : BUILTIN\Administrateurs
Group : P7-PGA\None
Access : BUILTIN\Administrateurs Allow FullControl
BUILTIN\Administrateurs Allow 268435456
AUTORITE NT\Système Allow FullControl
AUTORITE NT\Système Allow 268435456
BUILTIN\Utilisateurs Allow ReadAndExecute, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow Modify, Synchronize
AUTORITE NT\Utilisateurs authentifiés Allow -536805376
Audit :
Sddl : O:BAG:S-1-5-21-2592982558-1610811037-614518526-513D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICII
OID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)Cordialement,
Philippe GAZAGNE Consultant Infrastructure & Réseaux- Proposé comme réponse Philippe Gazagne lundi 17 mai 2010 16:06
- Marqué comme réponse Roxana PANAITMicrosoft employee mardi 18 mai 2010 08:31
samedi 15 mai 2010 09:43 -
Bonjour,
C'est bon, cela fonctionne.
Merci.Cordialement,
MLHlundi 17 mai 2010 06:28