I'm very new to scripting.
I created a script that places info into a CSV file, but one of the columns, I want to remove some of the text.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic –AllowRedirection
Import-PSSession $Session
Search-AdminAuditLog -UserIds somebody,somebody,somebody | Select-Object ObjectModified,CmdletName,CmdletParameters,Caller | Export-Csv \\Server\path\Reports\admin_audit$((Get-Date).ToString(' MM-dd-yyyy')).csv
Remove-PSSession $Session
The Caller column
nam.prod.outlook.com/Microsoft Exchange Hosted Organizations/international.onmicrosoft.com/Somebody I would like to remove everything up to, but excluding "Somebody" while the script is ran. Thanks |