<# .SYNOPSIS Set item attribute to 'Hidden' #> # For a single file, you can change the attributes property, like this: $file = Get-Item .\your_folder -Force $file.attributes = "Hidden" # To hide everything within a folder, you can use Get-ChildItem, like this: Get-ChildItem -Path "your_path_here" -Recurse -Force | ForEach-Object { $_.attributes = "Hidden" }