Search found 187 matches

by ITEngineer
Thu Aug 16, 2018 12:01 am
Forum: Windows PowerShell
Topic: Need some help in modifying PowerShell to Export mailbox?
Replies: 5
Views: 1044

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

Hi All, Thanks for the correction and the suggestion. Since the Get-Mailbox accept SMTPAddress, so how to combine the script below which exports the list of SMTP email address from the Input file. $Users = Get-Content -Path "C:\TEMP\Input.CSV" &{ foreach ($User in $Users) { Write-Host "Processing......
by ITEngineer
Tue Aug 14, 2018 10:27 pm
Forum: Windows PowerShell
Topic: Need some help in modifying PowerShell to Export mailbox?
Replies: 5
Views: 1044

Need some help in modifying PowerShell to Export mailbox?

Hi All, I need some help in modifying the PowerShell script to export user mailbox as .PST from input file below: The problem is that the input file is from the HR system as First Last name. How to write the logs to .CSV file when the export failed? #Import remote session with exchange on my laptop ...
by ITEngineer
Tue Aug 14, 2018 3:45 pm
Forum: Windows PowerShell
Topic: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV? [Part 2]
Replies: 8
Views: 1566

Re: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV? [Part 2]

First, you need to breakdown the objects you're trying to use to build this results. You need to understand that you'll be working with object types that are not only strings or integers. For exemple, the TotalItemSize is not a numeric value, and this is shown when displaying the value by itself. A...
by ITEngineer
Tue Aug 14, 2018 3:38 am
Forum: Windows PowerShell
Topic: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV? [Part 2]
Replies: 8
Views: 1566

Re: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV? [Part 2]

jvierra wrote:
Tue Aug 14, 2018 3:10 am
Doesn't work when executing this over a remote connection. The methods are not martialed.
So how to modify the line TotaItemSize = {$MbxStats.totalitemsize.Value.ToGB()} so it works when I execute it?
by ITEngineer
Tue Aug 14, 2018 12:20 am
Forum: Windows PowerShell
Topic: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV? [Part 2]
Replies: 8
Views: 1566

How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV? [Part 2]

Hi All, This is the modified script which is running faster than the script in the previous thread: $DataPath = "C:\TEMP\mbxresults.csv" $Results = @() $MailboxUsers = Get-Mailbox -ResultSize Unlimited foreach($user in $mailboxusers) { $UPN = $user.UserPrincipalName $MbxStats = Get-MailboxStatistics...
by ITEngineer
Mon Aug 13, 2018 6:32 am
Forum: Windows PowerShell
Topic: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV?
Replies: 4
Views: 915

Re: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV?

It runs very slow but, yes, that works Mr. Vierra :)

Thanks for the help in correcting the code.
by ITEngineer
Mon Aug 13, 2018 3:56 am
Forum: Windows PowerShell
Topic: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV?
Replies: 4
Views: 915

Re: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV?

Yes, you are right, there is no property in the Get-MailboxStatistics cmdlets, hence I have modified it into: Get-MailboxDatabase -Server SITE03-EX01 | Get-Mailbox -Database "PRDSITE3-DB04" -ResultSize Unlimited | Select-Object DisplayName, servername,database, RecipientTypeDetails,PrimarySmtpAddres...
by ITEngineer
Mon Aug 13, 2018 3:22 am
Forum: Windows PowerShell
Topic: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV?
Replies: 4
Views: 915

How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV?

I need some assistance to modify the script below to display one more column called PrimarySmtpAddress : Get-MailboxDatabase -Server SITE3SVR-EX01 | Get-Mailbox -ResultSize Unlimited -Database "PRODSITE3-DB" | Get-MailboxStatistics | Select DisplayName, MailboxType, ` DatabaseName, ` ServerName, ` @...
by ITEngineer
Thu Aug 09, 2018 8:58 pm
Forum: Windows PowerShell
Topic: Unable to query remote registry using PowerShell script
Replies: 12
Views: 1621

Re: Unable to query remote registry using PowerShell script

So how is it possible to show the column name of the Computer after modifying the script like below: Get-ADComputer -Filter {Enabled -eq $True} -SearchBase "DC=Domain,DC=com" | Where-Object {Test-Connection $_.Name -Count 1 -Quiet} | Select-Object -Property Name | ForEach-Object { Get-OfficeVersion ...
by ITEngineer
Thu Aug 09, 2018 8:52 pm
Forum: Windows PowerShell
Topic: Unable to query remote registry using PowerShell script
Replies: 12
Views: 1621

Re: Unable to query remote registry using PowerShell script

function Get-OfficeVersion{ param( [string]$ComputerName = $env:COMPUTERNAME ) # code to extract Word/Office version $hive = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('localmachine',$ComputerName) if($key = $hive.OpenSubKey('Software\Classes\Word.Application\CurVer')){ $wordApp = $key.GetVal...