From fc3cc4e38b86876cff950406939dc387ccbb64eb Mon Sep 17 00:00:00 2001 From: Maxime Kjaer Date: Wed, 17 Dec 2025 14:32:06 -0800 Subject: [PATCH 1/3] Fix progress printing on PowerShell ISE --- RestSetAcls/RestSetAcls/RestSetAcls.psm1 | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/RestSetAcls/RestSetAcls/RestSetAcls.psm1 b/RestSetAcls/RestSetAcls/RestSetAcls.psm1 index 8ad851bc..45f5d07a 100644 --- a/RestSetAcls/RestSetAcls/RestSetAcls.psm1 +++ b/RestSetAcls/RestSetAcls/RestSetAcls.psm1 @@ -5,14 +5,10 @@ Get-ChildItem -Path "$PSScriptRoot/Types/*.ps1" | ForEach-Object { . $_.FullName Get-ChildItem -Path "$PSScriptRoot/Helpers/*.ps1" | ForEach-Object { . $_.FullName } function Write-LiveFilesAndFoldersProcessingStatus { - [OutputType([int])] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute( - "PSReviewUnusedParameter", - "FileOrFolder", - Justification = "We don't print `$FileOrFolder but we do want to iterate over it")] + [OutputType([hashtable])] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true)] - [Object[]]$FileOrFolder, + [hashtable]$Item, [Parameter(Mandatory = $true)] [datetime]$StartTime, @@ -35,13 +31,13 @@ function Write-LiveFilesAndFoldersProcessingStatus { process { # If silent mode is enabled, do not print anything, just forward to pipeline if ($Silent) { - return $_ + return $Item } $i++ $timeSinceLastPrint = (Get-Date) - $lastPrint - if (-not $_.Success) { + if (-not $Item["Success"]) { $failures++ } @@ -73,7 +69,7 @@ function Write-LiveFilesAndFoldersProcessingStatus { $lastPrint = Get-Date } - Write-Output $_ + Write-Output $Item } } @@ -1089,7 +1085,7 @@ function Set-AzFileAclRecursive { # Set the ACL try { - Set-AzFileAclKey -File $_.File -Key $filePermissionKey -WhatIf:$WhatIfPreference + Set-AzFileAclKey -File $_.File -Key $filePermissionKey -WhatIf:$WhatIfPreference | Out-Null } catch { $success = $false @@ -1115,7 +1111,7 @@ function Set-AzFileAclRecursive { Success = $success ErrorMessage = $errorMessage } - } + } } ` | Write-LiveFilesAndFoldersProcessingStatus -RefreshRateHertz 10 -StartTime $startTime -Silent:$Silent ` | ForEach-Object { if ($PassThru) { Write-Output $_ } } From a414bc0583a40225c81a181e988ff5acc1d789cd Mon Sep 17 00:00:00 2001 From: Maxime Kjaer Date: Wed, 17 Dec 2025 14:38:02 -0800 Subject: [PATCH 2/3] Add uninstall instructions --- RestSetAcls/README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/RestSetAcls/README.md b/RestSetAcls/README.md index c534e03a..5f17b7e8 100644 --- a/RestSetAcls/README.md +++ b/RestSetAcls/README.md @@ -113,4 +113,17 @@ The terminology used in this module is explained below: - **Security Descriptor**: A structure that encodes the owner, group, and permissions of a file or folder. - **Access Control List (ACL)**: The part of the security descriptor that encodes the permissions of a file or folder. Since the ACL is the most important part of the security descriptor, we often use "ACL" to refer to the entire security descriptor, including owner and group. -- **Access Control Entry (ACE)**: An entry in the ACL that encodes the permissions for a specific user or group. \ No newline at end of file +- **Access Control Entry (ACE)**: An entry in the ACL that encodes the permissions for a specific user or group. + +## Uninstall + +To uninstall, run: + +```powershell +Uninstall-Module RestSetAcls +``` + +To uninstall dependencies that were installed along with RestSetAcls, see: + +- [Uninstall Az PowerShell](https://learn.microsoft.com/en-us/powershell/azure/uninstall-az-ps?view=azps-15.1.0) +- [Uninstall Microsoft Graph PowerShell](https://learn.microsoft.com/en-us/powershell/microsoftgraph/installation?view=graph-powershell-1.0#uninstalling-the-sdk) \ No newline at end of file From 2499447abc27a9bf513be9cb3c21f34b825ca1e0 Mon Sep 17 00:00:00 2001 From: Maxime Kjaer Date: Wed, 17 Dec 2025 14:38:25 -0800 Subject: [PATCH 3/3] Bump RestSetAcls to 0.2.10 --- RestSetAcls/RestSetAcls/RestSetAcls.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RestSetAcls/RestSetAcls/RestSetAcls.psd1 b/RestSetAcls/RestSetAcls/RestSetAcls.psd1 index dc74a2aa..92392751 100644 --- a/RestSetAcls/RestSetAcls/RestSetAcls.psd1 +++ b/RestSetAcls/RestSetAcls/RestSetAcls.psd1 @@ -12,7 +12,7 @@ RootModule = 'RestSetAcls.psm1' # Version number of this module. - ModuleVersion = '0.2.9' + ModuleVersion = '0.2.10' # Supported PSEditions # CompatiblePSEditions = @()