How to make this work. Thank you in advance.
$save = [Microsoft.VisualBasic.Interaction]::InputBox("What's your unid?(This will save it to your desktop)", "$pName", "")
$unid = [Microsoft.VisualBasic.Interaction]::InputBox("Enter the unid.", "$pName", "")
$name = Get-ADUser $unid | Select GivenName, Surname | ft -HideTableHeaders | Out-String
$fileName = "$name"+"$unid" | out-string
$service = get-adPrincipalGroupMembership $unid | Select Name | Sort Name | Export-csv C:\Users\$save\Desktop\$fileName.csv
Results
Export-csv : Illegal characters in path.