From d5821e17a5002e1f02ef746fa480f073afdd6571 Mon Sep 17 00:00:00 2001 From: Zachary Gorman Date: Tue, 6 May 2025 12:11:50 -0700 Subject: [PATCH] Piped directory creation to verbose instead of output --- Get-PC/Private/UserProfileTransfer.ps1 | 4 ++-- Get-PC/patchnotes.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Get-PC/Private/UserProfileTransfer.ps1 b/Get-PC/Private/UserProfileTransfer.ps1 index a6567a0..a42b8ef 100644 --- a/Get-PC/Private/UserProfileTransfer.ps1 +++ b/Get-PC/Private/UserProfileTransfer.ps1 @@ -77,7 +77,7 @@ Get-Item -Path "$Source\*" -Exclude ('Teams') | ForEach-Object { $tmpDst = Join-Path $Destination $_.Name if( -not ( Test-Path -Path $tmpDst -PathType Container ) ){ - New-Item "$tmpDst" -ItemType Container + New-Item "$tmpDst" -ItemType Container | Write-Verbose } Copy-Directory $_ $tmpDst -ProgressBarIndex 1 | Out-File $log -Append } @@ -108,8 +108,8 @@ function Copy-Directory { Get-ChildItem -Recurse $SourceDir | ForEach-Object { $TotalLength += $_.Length } $ProgressLength = 0 Get-ChildItem $SourceDir | ForEach-Object { - Write-Progress -Activity "Copying Directory" -Status "$SourceDir to $DestDir" -Id $ProgressBarIndex -PercentComplete $($ProgressLength*100/$TotalLength) $item = $_ + Write-Progress -Activity "Copying Directory $SourceDir to $DestDir" -Status "$item" -Id $ProgressBarIndex -PercentComplete $($ProgressLength*100/$TotalLength) $DestDirPath = Join-Path $DestDir $item.Name switch -Regex ($item.Mode) { 'd-----' { diff --git a/Get-PC/patchnotes.txt b/Get-PC/patchnotes.txt index 8ded698..ffcfb60 100644 --- a/Get-PC/patchnotes.txt +++ b/Get-PC/patchnotes.txt @@ -1,7 +1,7 @@ Patch -Update Custom SHSApps have more robust detection -Fix SCCM queries return mac address correctly --Update UserProfileBackup has progress bars! +-Add UserProfileBackup has progress bars! -Update UserProfileBackup doesn't copy Sticky Notes anymore -Update UserProfileBackup reports fewer non-critical errors