Originally Posted by
Thnikkaman
At work? No. Those projects end up more like this:
RemoveLineCarriage($objItem.userprincipalname + ";" + $objItem.name + ";" + $objItem.employeeid);
#
# RemoveLineCarriage
# This function converts an object to a simple string which removes any line carriages from the end.
#
function RemoveLineCarriage($object)
{
$result = [System.String] $object;
$result = $result -replace "`t","";
$result = $result -replace "`n","";
$result = $result -replace "`r","";
$result = $result -replace " ;",";";
$result = $result -replace "; ",";";
$result = $result -replace [Environment]::NewLine, "";
$result;
}