This has got to be a simple question, but I can’t seem to get this right.
I have a script that copies photos from one share to my local machine, and then will upload them to AD and Azure. Often the photos are not named properly so I want to pause the script for a moment to review the names and then continue on if good or once I have manually gone in an edited the broken names. I’ve tried start-sleep, pause, read-host and no matter which one I use the pause happens before the list of the names.
#variables $source = "\\server\photos" $dest = "C:\Scripts\Photos\" $oldphotos = "C:\scripts\Photos\old\" #copy files from share to dest Get-Childitem $source | Copy-Item -Destination $dest #prompt for manual review of files to ensure they are in the proper format Get-ChildItem $dest *.jpg | select name Read-Host "Review names and make sure they are correct"