This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#First, show the script which directory | |
$directory = "\\<HOST>\<Dir>\" | |
#[Optional!] Inside the directory defined above filter for folders you want to check | |
$folders = Get-ChildItem $Directory -Directory | Where-Object { $_.Name -like "XXXX??" } | |
#now go through each folder in that directory | |
foreach ($folder in $folders) | |
{ | |
Write-Host $folder |