将Outlook中安装的PST文件和PST大小列为CSV文件 [英] List mounted PST files and PST Size in Outlook to a CSV file

查看:77
本文介绍了将Outlook中安装的PST文件和PST大小列为CSV文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为即将开展的项目做一些腿部工作。  我需要知道用户在Outlook中安装了哪些PST文件,文件所在的位置以及文件的大小。      我正在尝试将此信息附加到CSV。      这个
会给我FileName和文件路径。


$ outlook
= New-Object
-comObject
Outlook.Application


$ outlook 会话存储
| < span style ="color:blue">其中
{( $ _ FilePath
- 喜欢 '*。PST')}
| format-table
DisplayName
FilePath |
Out-File - 追加
C:\ Temp \Psts.cvs
   


我被困在两个部分:



  • 在CSV文件中附加用户名
  • 查找连接的PST的文件大小

解决方案

 

outlook = New-Object -comObject Outlook.Application


outlook.Session.Stores |
其中{(


Doing some leg work for an upcoming project.  I need to know what PST files a user has mounted in Outlook, where the file is located and how large the file is.      I am trying append this information out to a CSV.      This will give me the FileName and the File Path.

$outlook = New-Object -comObject Outlook.Application

$outlook.Session.Stores | where { ($_.FilePath -like '*.PST') } | format-table DisplayName, FilePath | Out-File -Append C:\Temp\Psts.cvs   

I am stuck on two parts:

  • Appending the username in the CSV File
  • Finding the File Size of the PST connected

解决方案


outlook = New-Object -comObject Outlook.Application


outlook.Session.Stores | where { (


这篇关于将Outlook中安装的PST文件和PST大小列为CSV文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆