Skip to content

Instantly share code, notes, and snippets.

@torgro
Created October 27, 2015 21:28
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 torgro/64f81d40096578d82669 to your computer and use it in GitHub Desktop.
Save torgro/64f81d40096578d82669 to your computer and use it in GitHub Desktop.
function Get-LogFolder
{
[cmdletbinding()]
Param(
[string]$LogFolder = "c:\temp"
,
[string]$SWfolder = "\subfolder"
)
$LogFolder += "$SWfolder\$(get-date -Format yyMMddHHmm)"
Write-Verbose -Message "Logfolder is '$LogFolder'"
New-Item -ItemType Directory -Force -Path $LogFolder
return $LogFolder
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment