Skip to content

Instantly share code, notes, and snippets.

@andy51002000
Last active June 17, 2019 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andy51002000/c2e5660788f0eae6d201c0d0859053d7 to your computer and use it in GitHub Desktop.
Save andy51002000/c2e5660788f0eae6d201c0d0859053d7 to your computer and use it in GitHub Desktop.
Get Random Filename in powershell
function Get-RandomFilename {
[IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetRandomFileName() )
}
Get-RandomFilename
# Result ------------------------------
# PS C:\Windows\system32> Get-RandomFilename
# cbzivvcs
#
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment