Posts

Iterate thru folder hierarchy

Produce the list of files by iterating the folder stricture  get-childitem -Path  "\\FOLDERNAME\Shares\Archive\REPORTNAME" -recurse -Attributes !Directory ` | Where-Object { $_.CreationTime -ge "04/12/2025" -and $_.Length -gt 864} ` | Select-Object FullName, CreationTime, Length | Export-Csv -Path "C:\temp\OUTPUTFILENAME.csv" -NoTypeInformation Remember end line with ` (back tick) to continue on to the next line

PowerShell into Excel: ImportExcel Module Part 1

https://www.bronowski.it/blog/2020/06/powershell-into-excelimportexcel-module-part-1/  

dbatools.io = command-line SQL Server Management Studio: Table of contents

  https://www.bronowski.it/blog/2020/06/dbatools-io-command-line-sql-server-management-studio-table-of-contents/

dbatools.io = command-line SQL Server Management Studio

https://www.bronowski.it/blog/2020/06/dbatools-io-command-line-sql-server-management-studio/  

How to Excel with PowerShell

  https://www.bronowski.it/blog/2020/12/how-to-excel-with-powershell-importexcel/

How to change Excel metadata using PowerShell

  https://www.bronowski.it/blog/2021/02/how-to-change-excel-metadata-using-powershell/

Working with UNC folders

  # Source Folder Queries New-PSDrive -Name source -PSProvider FileSystem -Root "\\UNC path goes here" Get-ChildItem -Path source: | Get-Member Get-ChildItem -Path source: | Sort-Object LastWriteTimeUTC -Descending | Select-Object -Property LastWriteTimeUTC,Name -First 5 | Format-Table #Staging Folder Queries New-PSDrive -Name staging -PSProvider FileSystem -Root "\\UNC path goes here" Get-ChildItem -Path staging: | Sort-Object LastWriteTimeUTC -Descending | Select-Object -Property LastWriteTimeUTC,Name  -First 5 | Format-Table