Written by 4:45 pm Microsoft, PowerShell, Windows, Windows Server • One Comment

Powershell: Create a tempfile with Powershell

Powershell Header

Sometimes you need to save some data in to a tempfile. And instead of creating a ownen file for this you could use the .NET function to create a really tempfile in the tempfile directory.

This is the how you can create a new tempfile:

$tempFile = [System.IO.Path]::GetTempFileName()

And now you can parse data into this file.

Tags: , , , , , , , Last modified: April 20, 2011
Close Search Window
Close