Search found 187 matches

by ITEngineer
Tue Aug 21, 2018 8:05 am
Forum: Windows PowerShell
Topic: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?
Replies: 16
Views: 2628

Re: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?

Sorry. It should be like thi: Import-Csv -Path $ExportCSVPath | ForEach-Object{Get-MailBox $_.PrimarySmtpAddress} | Many thanks for the suggestion Mr. Vierra, it is progressing well, however it is now stuck with the below error: The user First.Last@domain.com.PST file is already existing cmdlet Get...
by ITEngineer
Tue Aug 21, 2018 7:48 am
Forum: Windows PowerShell
Topic: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?
Replies: 16
Views: 2628

Re: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?

This is my updated script as per your suggestion: $Server = 'PRDFS01-VM' $ServerBackupUNCPath = "\\$Server\PST" $InputCSVPath = 'C:\LOGS\Input.csv' $ExportCSVPath = 'C:\LOGS\Output.csv' $ExportExistsCSVPath = 'C:\LOGS\Exist.csv' Import-PSSession ($Session = New-PSSession -ConfigurationName Microsoft...
by ITEngineer
Tue Aug 21, 2018 7:36 am
Forum: Windows PowerShell
Topic: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?
Replies: 16
Views: 2628

Re: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?

Its a CSV. You have to reference it correctly. We've done this many times before. Import-Csv -Path $ExportCSVPath | Get-MailBox $_.PrimarySmtpAddress | Hi Mr. Vierra, Yes I have tried that as well, but the error remains the same: The input object cannot be bound to any parameters for the command ei...
by ITEngineer
Mon Aug 20, 2018 11:13 pm
Forum: Windows PowerShell
Topic: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?
Replies: 16
Views: 2628

[UPDATED]: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?

Where did you do this? The code doesn't do anything like that. I have updated and minimize the error to just around the Import-Csv -Path $ExportCSVPath | Get-MailBox $_ section. This is the updated code: $Server = 'PRDFILESVR01-VM' $ServerBackupUNCPath = "\\$Server\PST" $InputCSVPath = 'C:\LOGS\Inp...
by ITEngineer
Mon Aug 20, 2018 5:26 pm
Forum: Windows PowerShell
Topic: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?
Replies: 16
Views: 2628

Re: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?

Same issue. What is this: "Get-Content -Path $InputCSVPath" You cannot .load a CSV suing Get-Content. A Csv has headers and columns. Get-Content will not convert it into anything. What is this supposed to do? Hi Mr. Vierra, This is the updated code that I have adapted based on your suggestion. $Ser...
by ITEngineer
Mon Aug 20, 2018 4:37 pm
Forum: Windows PowerShell
Topic: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?
Replies: 16
Views: 2628

Re: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?

Where did you do this? The code doesn't do anything like that. This is the code that converts the list of First Last name into the email address into .CSV: $Users = Get-Content -Path $InputCSVPath &{ foreach ($User in $Users) { Write-Host "Processing.... $User" Get-Mailbox $User.ToString() | Select...
by ITEngineer
Mon Aug 20, 2018 1:46 am
Forum: Windows PowerShell
Topic: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?
Replies: 16
Views: 2628

Re: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?

Hi Mr. Vierra,

Actually I have converted those names with the other lines of code to WindowsEmailAddress format, so the input is now First.Last@domain.com

Your help to assist me in this scripting would be muchly appreciated.
by ITEngineer
Sun Aug 19, 2018 11:30 pm
Forum: Windows PowerShell
Topic: PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?
Replies: 16
Views: 2628

PowerShell to check file exist in the destination folder before exporting the Exchange email as .PST?

Hi People, I need some assistance in fixing the below PowerShell script that can do the export First.LastName@domain.com.PST from the .CSV input file: Johny Hargreaves Linda Marino Henry Hosain Vicki Cunard Amalia Stokes ... Check if the exported First.LastName@domain.com.PST is already existing on ...
by ITEngineer
Thu Aug 16, 2018 6:47 pm
Forum: Windows PowerShell
Topic: Need some help in modifying PowerShell to Export mailbox?
Replies: 5
Views: 1052

Re: Need some help in modifying PowerShell to Export mailbox?

We use "Import-CSv" to load CSV files. We then use the column name to access specific fields in a Csv. $users = Import-Csv C:\TEMP\Input.CSV $emails = foreach ($user in $users) { Write-Host 'Processing....' $User.Alias Get-Mailbox $User.Alias } $emails | Select WindowsEmailAddress | Export-Csv C:\T...