![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Determine PST Format Hi there, Is anyone able to tell me if it's possible to use powershell to determine the version\format of a PST file? Thanks, jtsm |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Determine PST Format Another option might be to use powershell, to determine if the encoding is unicode or ansi... |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Determine PST Format It may not be the safest/best way, but I tell them apart by checking the char length of the StoreID: # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # ScriptBlock that retrieves the PST Format $sb = {$(switch ($this.StoreID.length) { {$_ -le 140} {'Personal Folders File (97-2002)'; break} default {'Personal Folders File'; break} })} # Outlook instance $ol = new-object -c outlook.application $ol.session.stores | # ...or $ol.getNamespace('Mapi').stores | add-member ScriptProperty Format -value $sb -passthru | ft FilePath, DisplayName, Format -autoSize -wrap $ol.quit() # next line may not be necessary in your system while (ps -n outlook -ea 0) {spps -n outlook} -- Robert |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Determine PST Format Thanks Robert, Is there a way to have it check a detached from Outlook PST file? for example, if I had alot of PST files on a file share, and have it check each one for the format? I'm pretty novice with PS, and when you start using constants, I loose track somewhat with what the script is doing... esp the instance section.. Thanks, jtsm "Robert Robelo" wrote: Quote: > It may not be the safest/best way, but I tell them apart by checking the > char length of the StoreID: > > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # > # ScriptBlock that retrieves the PST Format > $sb = {$(switch ($this.StoreID.length) { > {$_ -le 140} {'Personal Folders File (97-2002)'; break} > default {'Personal Folders File'; break} > })} > # Outlook instance > $ol = new-object -c outlook.application > $ol.session.stores | # ...or $ol.getNamespace('Mapi').stores | > add-member ScriptProperty Format -value $sb -passthru | > ft FilePath, DisplayName, Format -autoSize -wrap > $ol.quit() > # next line may not be necessary in your system > while (ps -n outlook -ea 0) {spps -n outlook} > > -- > Robert > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| -f format Format-Table Format-List against Select | PowerShell | |||
| Windows Mail format bar doesn't format color, size, justification | Browsers & Mail | |||
| Rich text format or HTML format | Vista performance & maintenance | |||
| Converting date time format to string format | PowerShell | |||
| Help! DVD format error: "Windows was unable to complete the format | Vista General | |||