Hi -In my environment, we have a username in the first name and surname format (eg Jones.Indiana).
I would like to anonymize the full name, e.g .:
Ion**
Indium****
I made a powershell oneliner but I don’t know how to apply it (the script works fine outside of DesktopInfo).
I am asking for help in starting (below example for the first segment):
powershell.exe -Command “$UserName = $env:UserName; $UserFirst = (Get-Culture).TextInfo.ToTitleCase($UserName.split(‘.’)[0]); $UserFirstHide = $UserFirst.SubString(0,3); $StringFirst = $UserFirst.Length -3; $HideFirst = $UserFirstHide+(‘*’ * $StringFirst) | Write-Host -NoNewline”