Skip to content

Instantly share code, notes, and snippets.

@Azooz2014
Last active September 12, 2022 08:59
Show Gist options
  • Save Azooz2014/257ac98d2630ad006fccae44d7f09b64 to your computer and use it in GitHub Desktop.
Save Azooz2014/257ac98d2630ad006fccae44d7f09b64 to your computer and use it in GitHub Desktop.
Get Directories names with last write formated date.
$path = "" # Your Folder Path here.
Get-ChildItem -Directory -Depth 1 $path |
Select-Object @{
name='Fullname'; # Can be replaced with Name if you want just directory name.
expression={$_.FullName}
}, @{
name='LastWriteTime';
expression={($_.LastWriteTime).toShortDateString()}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment