Step1:
Below is the code script which we have to mention in power shell script file let say , example.ps1
class CommonInformation
{
[string]$folderName
}
[string]$folderName
}
[CommonInformation]$cInfo = [CommonInformation]::new()
$cInfo.folderName = Get-Date -Format 'yyyyMMdd_hh_mm_ss'
Write-Host $cInfo.folderName
No comments:
Post a Comment