Search found 210 matches

by ITEngineer
Wed Jun 27, 2018 5:22 am
Forum: PowerShell
Topic: PowerShell to calclualte the size of files and total file size in a directory not working ?
Replies: 4
Views: 1244

Re: PowerShell to calclualte the size of files and total file size in a directory not working ?

I got this error on the column for the DB & log size: ERROR: You cannot call a method on a null-valued expression. is it because I'm executing it from my laptop PowerShell ISE as Administrator: $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://PRDEXC01-VM/PowerShell/ -Au...
by ITEngineer
Wed Jun 27, 2018 4:24 am
Forum: PowerShell
Topic: PowerShell to calclualte the size of files and total file size in a directory not working ?
Replies: 4
Views: 1244

PowerShell to calclualte the size of files and total file size in a directory not working ?

Hi People, I need someone to fix the below script which calculates the Mailbox.EDB file size in GB as well as Log files size which doesn't seem to be working? Get-MailboxDatabase | Select Server, Name, @{Name="Number of Mbx";expression={(Get-Mailbox -Database $_.Identity | Measure-Object).Count}}, @...
by ITEngineer
Tue Jun 26, 2018 11:16 pm
Forum: PowerShell
Topic: PowerShell to parse Exchange message tracking not working ?
Replies: 13
Views: 2922

Re: PowerShell to parse Exchange message tracking not working ?

jvierra wrote:
Tue Jun 26, 2018 11:08 pm
What exact command caused that error? It appears you have an issue with our Exchange server.
It's this command: Get-MessageTrackingLog, hence I need some help in fixing that issue ?
by ITEngineer
Tue Jun 26, 2018 11:04 pm
Forum: PowerShell
Topic: PowerShell to parse Exchange message tracking not working ?
Replies: 13
Views: 2922

Re: PowerShell to parse Exchange message tracking not working ?

Mr Vierra, It is the below error not the date: Cannot process argument transformation on parameter 'End'. Cannot convert value "27/06/2018 11:00:00 AM" to type "System.DateTime". Error: "String was not recognized as a valid DateTime." The input object cannot be bound to any parameters for the comman...
by ITEngineer
Tue Jun 26, 2018 10:31 pm
Forum: PowerShell
Topic: PowerShell to parse Exchange message tracking not working ?
Replies: 13
Views: 2922

Re: PowerShell to parse Exchange message tracking not working ?

jvierra wrote:
Tue Jun 26, 2018 10:24 pm
Copy and paste this:

[datetime]'1/3/2018 1:00:00 AM'
The result is:
Wednesday, 3 January 2018 1:00:00 AM
by ITEngineer
Tue Jun 26, 2018 10:11 pm
Forum: PowerShell
Topic: PowerShell to parse Exchange message tracking not working ?
Replies: 13
Views: 2922

Re: PowerShell to parse Exchange message tracking not working ?

I've swapped the DD/MM/YYYY with MM/DD/YYYY, However the error message is now just like below repeated 15x as the number of my Exchange servers: The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties ...
by ITEngineer
Tue Jun 26, 2018 9:23 pm
Forum: PowerShell
Topic: PowerShell to parse Exchange message tracking not working ?
Replies: 13
Views: 2922

Re: PowerShell to parse Exchange message tracking not working ?

Thanks for the assistance in this matter, somehow it is still displaying the same issue: Cannot convert value "1/03/2018 3:00:00 PM" to type "System.DateTime". Error: "String was not recognized as a valid DateTime." At C:\Users\Admin\AppData\Local\Temp\12567d90-4897-4db9-856c-8ae0385a7fde.ps1:5 char...
by ITEngineer
Tue Jun 26, 2018 7:11 pm
Forum: PowerShell
Topic: PowerShell to parse Exchange message tracking not working ?
Replies: 13
Views: 2922

PowerShell to parse Exchange message tracking not working ?

Hi All, I need some help in fixing the below PowerShell script for Exchange Server message tracking log. Basically, the script is searching for all NDR (email with the subject "*Undeliverable: *" ) that is delivered within the specific time frame, in the case above is 1st March 2018 until today 27th...
by ITEngineer
Wed Jun 06, 2018 7:55 pm
Forum: PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 2746

Re: Exchange PowerShell Unable to export list to CSV ?

That doesn't make any sense. If the output is correct then the CSV will reflect the output. You have some kind of mistake in the code and you are likely not using the exact code I posted. This would be a better way to do this: $inputFile = 'C:\trackingemail.csv' $trackparams = @{ Start = (Get-Date)...
by ITEngineer
Wed Jun 06, 2018 7:34 pm
Forum: PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 2746

Re: Exchange PowerShell Unable to export list to CSV ?

Now tell me what this produces. foreach ($email in (Import-Csv $inputFile)) { Write-host "Email address: $($email.email)" $resultFile = "C:\$($email.email).CSV" $TransportServers = Get-TransportService $TransportServers | % { Get-Messagetrackinglog -Server $_.Name @trackparams -Recipients $email.em...