PowerShell Output Field Separator ($OFS variable)

$OFS which is a special variable in Powershell. OFS stands for Output Field Separator. It exposes the .Net’s Systems.String object. as shown below   You would use this to separate objects in your array For example: If you run the below code to display objects in $array you’ll see the objects displayed one in each new line as that is the default object separator: CODE: $array = (1,3,5,7) $array   OUTPUT: 1 3 5 7       By using $OFS variable, you’ll be able to specify your own separator character as shown below: Note: as the OFS operates on […]

Read more