Search found 12540 matches

by jvierra
Wed Aug 15, 2018 1:45 pm
Forum: Windows PowerShell
Topic: Need some help in modifying PowerShell to Export mailbox?
Replies: 1
Views: 35

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

Please try to learn how to correctly format your code. It will help us to read it and it will help you to see the more obvious mistakes. $ServerBackupUNCPath = '\\FILESERVER\OST\' $CSVPath = 'C:\LOGS\users.csv' $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://PRDM...
by jvierra
Wed Aug 15, 2018 12:56 pm
Forum: Windows PowerShell
Topic: PST Find,Rename and Move
Replies: 5
Views: 46

Re: PST Find,Rename and Move

I recommend that you write your script and then post a specific question.

You can check if a filename is I use with "Test-Path".

help test-path -Full

CHeck the examples to see how to use the command.
by jvierra
Wed Aug 15, 2018 8:36 am
Forum: Windows PowerShell
Topic: PST Find,Rename and Move
Replies: 5
Views: 46

Re: PST Find,Rename and Move

Can you post your script. Are you getting errors? If so, please post the complete error message.
by jvierra
Tue Aug 14, 2018 5:31 pm
Forum: Windows PowerShell
Topic: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV? [Part 2]
Replies: 8
Views: 101

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

The following will be much faster as it avoids multiple unnecessary trips to the server. $filePath = 'C:\TEMP\mbxresults.csv' $results = foreach ($mbx in (Get-Mailbox -ResultSize Unlimited)) { $stats = Get-MailboxStatistics $mbx.UserPrincipalName if($stats.TotalItemSize.Value -match '\((.*)\sbytes\)...
by jvierra
Tue Aug 14, 2018 2:31 pm
Forum: Windows PowerShell
Topic: Export Logs of all PS functions during operation.
Replies: 6
Views: 170

Re: Export Logs of all PS functions during operation.

The easiest way to do this is to create a log function and place it throughout your code. function log{ Param( [string]LogMsg, [string]$Type = 'Info', ) $msg = '{0},{1},"{2}"' -f [datetime]::Now.ToString('s'), $Type, $LogMsg $msg | Out-File $FilePath -Append } #examples log 'Copy a file' # error mes...
by jvierra
Tue Aug 14, 2018 3:10 am
Forum: Windows PowerShell
Topic: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV? [Part 2]
Replies: 8
Views: 101

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

Doesn't work when executing this over a remote connection. The methods are not martialed.
by jvierra
Mon Aug 13, 2018 4:49 am
Forum: Windows PowerShell
Topic: How to export the Exchange MailboxStatistics along with PrimarySmtpAddress to .CSV?
Replies: 4
Views: 89

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

Code: Select all

	@{label="TotalItemSize";expression={
              $tis = (Get-MailboxStatistics $_).TotalItemSize
              $tis.ToString().Split('(')[1].Split(' ')[0].Replace(',','')/1MB
        }},  
by jvierra
Mon Aug 13, 2018 12:08 am
Forum: Windows PowerShell
Topic: Trouble creating meeting request
Replies: 4
Views: 125

Re: Trouble creating meeting request

Pick the mailbox and save the appointment I n that mailbox.

$mailbox = $olNamespace.Stores('userid@domain.com')
$appointment = $ol.CreateItem('olAppointmentItem')
$mailbox.Folders['foldername'].Items.Add($appointment)
by jvierra
Sun Aug 12, 2018 8:31 am
Forum: Windows PowerShell
Topic: win 10 app tile size
Replies: 6
Views: 109

Re: win 10 app tile size

Sorry. I can't see nay PowerShell methods that can do what you are trying to do.

Download the ADK to see more information on how this is intended to work.