[問題] delegate在powershell裡要怎麼用?

看板C_Sharp作者 (不要叫我大大)時間15年前 (2010/09/27 21:55), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
不知道有沒有走錯版, 這個問題跟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
文章代碼(AID): #1CeA9TgZ (C_Sharp)