where does a break bring me? If I have nested if's does a break bring me 1 up or all the way out?
It this example below if I want to get to the if ($UTC) how do I get there?
If ($UTC) {
If (!$NoSeperators) {
If ($JustDate) {
$FullPath = Join-AnyPath $DirectoryName ((Get-Date).ToUniversalTime().ToString("yyyy_MM_dd-") + ($ReportNameExt))
Break
}
IF ($NoSeconds) {
$FullPath = Join-AnyPath $DirectoryName ((get-date).ToUniversalTime().ToString("yyyy_MM_ddThhmm-") + ($ReportNameExt))
Break
}
$FullPath = Join-AnyPath $DirectoryName ((Get-Date).ToUniversalTime().ToString("yyyy_MM_ddThhmmss-") + ($ReportNameExt))
}
# Remove dash and underscores with NoSeperators switch.
IF ($NoSeperators) {
IF ($JustDate) {
$FullPath = Join-AnyPath $DirectoryName ((Get-Date).ToUniversalTime().ToString("yyyyMMdd") + ($ReportNameExt))
Break
}
IF ($NoSeconds) {
$FullPath = Join-AnyPath $DirectoryName ((get-date).ToUniversalTime().ToString("yyyyMMddThhmm") + ($ReportNameExt))
Break
}
$FullPath = Join-AnyPath $DirectoryName ((Get-Date).ToUniversalTime().ToString("yyyyMMddThhmmss") + ($ReportNameExt))
}
}