1 回答

TA貢獻(xiàn)1854條經(jīng)驗(yàn) 獲得超8個(gè)贊
創(chuàng)建自己的對(duì)象的一種方法是向現(xiàn)有對(duì)象添加腳本方法或簡(jiǎn)單的 NoteProperties。(請(qǐng)務(wù)必明確選擇您需要的所有屬性)
$MailBoxes = Get-MailBox | Foreach-Object {
$autoConfig = $_ | Get-MailboxAutoReplyConfiguration
$_ | Add-Member -Type NoteProperty -Name AutoReplyState -Value $autoConfig.AutoReplyState
$_ | Add-Member -Type NoteProperty -Name InternalMessage -Value $autoConfig.InternalMessage
$_ | Add-Member -Type NoteProperty -Name ExternalMessage -Value $autoConfig.ExternalMessage
}
$MailBoxes | Select-Object *
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/add-member?view=powershell-6
- 1 回答
- 0 關(guān)注
- 193 瀏覽
添加回答
舉報(bào)