Converting the FileSystemObject's GetTempName Method

Definition: Generates a random 8-character file name with a .tmp file extension. Note that this method does not create the file, it only generates the name.


You can use GetTempFileName method of the .NET Framework’s Path object to generate a temporary file name in PowerShell:


See conversions of other FileSystemObject methods and properties.
Return to the VBScript to Windows PowerShell home page