Update 5 files

- /Windows/getAcl.ps1
- /Windows/FirefoxAutoUpdate.ps1
- /Windows/get-bio.ps1
- /Intune/UpdateForensITXML-ProfWiz.ps1
- /Sharepoint/sharepoint-taille-trash.ps1
This commit is contained in:
Sébastien QUEROL
2023-05-22 12:51:19 +00:00
parent d8a61d1aae
commit 5eb68f1858
5 changed files with 156 additions and 0 deletions

25
Windows/getAcl.ps1 Normal file
View File

@ -0,0 +1,25 @@
#On demande à l'user de rentrer le chemin source
$entPath = Read-Host "Chemin vers le dossier a examiner : "
#et le chemin cible
$outPath = Read-Host "Ou stocker le CSV : "
#On active la recursion
$FolderPath = dir -Directory -Path "$entPath" -Recurse -Force
$Report = @()
#Une petite boucle pour recuperer les ACL de tous les dossiers
Foreach ($Folder in $FolderPath) {
$Acl = Get-Acl -Path $Folder.FullName
foreach ($Access in $acl.Access)
{
$Properties = [ordered]@{'FolderName'=$Folder.FullName;'AD
Group or
User'=$Access.IdentityReference;'Permissions'=$Access.FileSystemRights;'Inherited'=$Access.IsInherited}
$Report += New-Object -TypeName PSObject -Property $Properties
}
}
#On stocke le rapport la ou l'user veut
$Report | Export-Csv -path "$outPath"