Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How to exclude characters from cell, while creating CSV file

$
0
0

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



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>