SyntaxHighlighter Code (evolved)
Most like PowerShell ISE in appearance code but no copy button
# Determine the OU of a given user
$path = Get-ADUser username |
Select @{n='OU';e={$_.DistinguishedName -replace '^.*?,(?=[A-Z]{2}=)'}}
Write-output $path
Enlighter Sourcecode
Least like PowerShell ISE in appearance but does have copy and other options
# Determine the OU of a given user $path = Get-ADUser username | Select @{n='OU';e={$_.DistinguishedName -replace '^.*?,(?=[A-Z]{2}=)'}} Write-output $path
Code Pro
Has decent enough look similar to PowerShell ISE with a copy button
# Determine the OU of a given user
$path = Get-ADUser username |
Select @{n='OU';e={$_.DistinguishedName -replace '^.*?,(?=[A-Z]{2}=)'}}
Write-output $path