Powershell in c# and permissions
问题 I am running PowerShell scripts from a Windows service running as SYSTEM account. To increase rights I am letting users select a user that I later impersonate the whole thread as using LogonUser method. This works so that I can access network drives and when I try to print the current user in PowerShell that works too. But I have a case when it does not work: One example is a user trying to load Exchange snapin and run cmdlet: Get-MailboxPermission Then he get error: The term 'Get