我想在 Microsoft Windows Server 上的不同用户下运行一个进程(而不是服务),并且我需要这样做所需的最少权限。
需要最少的权限集,因为此用户不应仅能够登录和访问所需的资源。
这样的事情应该工作:
Start-Process -Credential $cred -FilePath calc.exe
Run Code Online (Sandbox Code Playgroud)
我研究了用户权利政策,但没有取得显着的成功。
windows active-directory user-management group-policy user-permissions
我想通过powershell连接Office 365,参考教程一个很简单的任务。但显然不适合我。
我想我错过了一个简单但重要的琐事。
一些信息:
我尝试了以下
PS C:\>Import-Module MSOnline
PS C:\>$msolcred = get-credential
PS C:\>connect-msolservice -credential $msolcred
connect-msolservice : The user name or password is incorrect. Verify your user name, and then type your password again.
Run Code Online (Sandbox Code Playgroud)
和
PS C:\> $O365Session = New-PSSession -ConfigurationName Microsoft.Exchange
-ConnectionUri https://ps.outlook.com/powershell
-Credential $msolcred -Authentication Basic
-AllowRedirection
New-PSSession : [ps.outlook.com] Connecting to remote server ps.outlook.com failed with the following error …Run Code Online (Sandbox Code Playgroud)