Word-wrap PowerShell commands

Last updated

Last updated
// Some random code snippet I have grabbed from one of my scripts with out wrapping
$sessions = get-vbrbackupsession | where { ($_.CreationTime -ge $reportstartdate -and $_.CreationTime -le $reportstopdate) -and (($_.JobType -eq 'Backup') -or ($_.JobType -eq 'NasBackup')) } | Sort-Object -property Name, CreationTime
// And the same with wrapping...
$sessions = get-vbrbackupsession |
where { ($_.CreationTime -ge $reportstart -and $_.CreationTime -le $reportend) `
-and (($_.JobType -eq 'Backup') `
-or ($_.JobType -eq 'NasBackup')) } |
Sort-Object -property Name, CreationTime