Search found 210 matches

by ITEngineer
Wed Jun 06, 2018 6:59 pm
Forum: PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 3545

Re: Exchange PowerShell Unable to export list to CSV ?

And what does this show you? 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.email...
by ITEngineer
Wed Jun 06, 2018 6:36 pm
Forum: PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 3545

Re: Exchange PowerShell Unable to export list to CSV ?

Is that what you want? Where is the data. Look like a bunch of headers to me. I only want these as the content of the each respective .CSV file: Name Count ---- ----- no-reply@email.com 123 no-reply@email2.com 93 Alert@email2.com 67 Now run this to see what you get. It works to display the result i...
by ITEngineer
Wed Jun 06, 2018 6:20 pm
Forum: PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 3545

Re: Exchange PowerShell Unable to export list to CSV ?

Now run this to see what you get. foreach ($email in (Import-Csv $inputFile)) { Write-host "Email address: $($email.email)" $TransportServers = Get-TransportService $TransportServers | % { Get-Messagetrackinglog -Server $_.Name @trackparams -Recipients $email.email | ? { $_.Sender -notmatch $rxDoma...
by ITEngineer
Wed Jun 06, 2018 5:54 pm
Forum: PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 3545

Re: Exchange PowerShell Unable to export list to CSV ?

Then add one line at a time until you have found the issue. Time to learn how to debug a script … eh? Yes, I ahve removed the line Export-CSV $resultFile -NoTypeInformation from the original script and the result is displayed on the console. But how to export it to the respective .CSV file ? hence ...
by ITEngineer
Wed Jun 06, 2018 5:29 pm
Forum: PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 3545

Re: Exchange PowerShell Unable to export list to CSV ?

Run as follows to be sure you are getting any results. foreach ($email in (Import-Csv $inputFile)) { Write-host "Email address: $($email.email)" Get-TransportService | ForEach-Object { Get-Messagetrackinglog -Server $_.Name @trackparams -Recipients $email.email } } Yes, Mr. Vierra, I got lots of co...
by ITEngineer
Wed Jun 06, 2018 5:11 pm
Forum: PowerShell
Topic: Exchange PowerShell Unable to export list to CSV ?
Replies: 15
Views: 3545

Exchange PowerShell Unable to export list to CSV ?

Hi, I have modified this script to take multiple inputs from trackingemail.csv to count the statistics for the external email that was delivered in the past 1 day. $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://PRODMAIL01-VM/PowerShell/ -Authentication Kerberos ...
by ITEngineer
Mon Jun 04, 2018 4:08 am
Forum: PowerShell
Topic: Exporting the Get-EventLog to .CSV ?
Replies: 3
Views: 2160

Re: Exporting the Get-EventLog to .CSV ?

Start with:' ]b]help Get-WinEvent -online[/b] Read the Examples very carefully. OK, I then come up with the below modified script: Get-ADComputer -LDAPFilter "(&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=8192))" | ForEach-Object { "Processing $($_.DNSHostName) ..." | Write...
by ITEngineer
Mon Jun 04, 2018 12:41 am
Forum: PowerShell
Topic: Exporting the Get-EventLog to .CSV ?
Replies: 3
Views: 2160

Exporting the Get-EventLog to .CSV ?

People, I need some assistance here to modify the below PowerShell script to pull some information from the Security EventLog ID 4624, 4625, 4723 and 4724... using the below PowerShell script: Get-ADComputer -LDAPFilter "(&(objectCategory=computer)(userAccountControl:1.2.840.113556.1.4.803:=8192))" ...
by ITEngineer
Wed May 30, 2018 1:46 am
Forum: PowerShell
Topic: Exporting the ResolveDNS to CSV ?
Replies: 5
Views: 1817

Re: Exporting the ResolveDNS to CSV ?

Is this what you are trying to ask? $fqdn = 'bing.com' Resolve-DnsName -Name $fqdn -Type NS -DnsOnl| Where{$_.Address} | select @{n='DomainName';e={$fqdn}},@{n='PublicIP';e={$_.IpAddress}},@{n='DNSServer';e={$_.Name}} Yes, exactly, so the input will be the CSV file containing 55 domains.
by ITEngineer
Tue May 29, 2018 10:02 pm
Forum: PowerShell
Topic: Exporting the ResolveDNS to CSV ?
Replies: 5
Views: 1817

Re: Exporting the ResolveDNS to CSV ?

Yes, that does make sense guys.

I will try to create the object and repost here if I need some scripting help again.

Thanks,