【发布时间】:2015-12-12 07:57:43
【问题描述】:
我正在运行一个 powershell 以将 Exchange 在线用户数据导出到一个 TXT 文件中,其中我提到了 C:\Users\%userprofile%\Desktop\Getdata.txt 作为一个位置,但是这个脚本在我们有不同用户的不同计算机上运行,所以我想将数据导出到桌面直接访问用户
脚本就是这样
Start-Transcript
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
get-mailbox |FT >C:\Users\%userprofile%\Desktop\Getdata.txt
Stop-Transcrip
我仍然无法将数据导出到桌面。我无法直接在C:\ 上导出数据,因为用户没有任何本地磁盘的权限。这是否可以在获取邮箱之前保持 powershell 完好无损。
【问题讨论】:
标签: powershell exchange-server powershell-2.0