如何从Exchange服务器获取文件夹的ID? [英] How to get folder's Ids from Exchange server?

查看:133
本文介绍了如何从Exchange服务器获取文件夹的ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

我想知道:如何从Exchange服务器获取所有文件夹的ID?

I want to know: how I can get all folder's Ids from Exchange server?

我的最终目标是:从众所周知的盒子"收件箱"中移动一些邮件。按名称TO自定义邮箱(我已创建),所以我知道,有一个方法MoveItem()用于movng邮件。

My finally aim is: to move some mails from well-known box "inbox" by name TO custom mailbox ( which I have created ), so I know, that there is the method MoveItem() for movng mails.

但是在这个方法的args中,只有两个变体:

But in args of this method, there are only two variants:

- 使用文件夹ID

- using folder ID

- 使用WellKnown框

- using WellKnown box

所以,我不需要把它变为众所周知的。我需要移动到自定义框,所以我必须知道我的自定义文件夹的文件夹ID。

So, I do not need to move it to well-known. My need is to move to custom box and so I must know folder ID of my my custom folder.

我搜索了SearchFolder和FolderView类 - 但我不清楚如何查找。

I have searched classes SearchFolder and FolderView - but it's not clear for me how to find.

所以equstions是:

So the equstions are:

- 如何在我的Exchange服务器上获取所有文件夹的ID?

- how to get all folder's ids at my Exchange server?

- 如何按名称查看自定义文件夹ID?

- how can I seatch my custom folder ids by name ?

 

Best Reagrds,

Best Reagrds,

Oleg

 

推荐答案

要获取邮箱的文件夹ID,您可以运行以下命令

For getting the folder ID's for a mailbox you can run the below command

get-mailbox -Identity< Mailbox Alias> | get-mailboxfolderstatistics | select-object Name,FolderId

get-mailbox -Identity <Mailbox Alias> | get-mailboxfolderstatistics | select-object Name, FolderId

该命令将返回所有文件夹名称和相关文件夹ID

The command will return all the folder names and the associated folder Id's

希望这会有所帮助。

Mahendra


这篇关于如何从Exchange服务器获取文件夹的ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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