Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
$PSTfiles = dir 'c:\temp\pstfiles\PST Export_Export\03.16.2022-1208PM\Exchange' | Select-Object name
$filepath = "C:\temp\ImportPSTMapping.csv"
# Header for CSV file
"Workload,FilePath,Name,Mailbox,IsArchive,TargetRootFolder,ContentCodePage,SPFileContainer,SPManifestContainer,SPSiteUrl" | Out-File -Encoding utf8 -FilePath $filepath
foreach($PSTfile in $PSTfiles){
$mailbox = @()
#First domain is the source domain+.pst
#Seccond domain is the destination domain
$mailbox = (($"-"))[0].Replace("","")
"Exchange,/Exchange,,,FALSE,/,,,," | Out-File -Encoding utf8 -FilePath $filepath -Append
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment