[問題] delegate在powershell裡要怎麼用?
不知道有沒有走錯版,
這個問題跟powershell, sharepoint比較相關。
是這樣的,我之前用C#寫sharepoint 的 Event Receiver時,
常常會用到這種寫法
SPSecurity.RunWithElevatedPrivileges(delegate()
{
// do things assuming the permission of the "system account"
});
不過最近開始改用powershell寫Event Receiver,
(
http://cglessner.blogspot.com/2008/12/sharepoint-power-event-receiver-20.html
)
發現沒辦法"sudo"做一些高權限的事情,
我去問這個plug-in的原作者,
可是他提供的語法過不了,
想請問上面那種C#扣有沒有可能用powershell寫呢?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 211.22.63.250