在开发Visual Studio Code(vscode)扩展时,我问自己如何使用本机方法正确读取git ref像当前分支一样。
我当前的解决方案更像是一种解决方法:
git rev-parse', '--abbrev-ref', 'HEAD'此处实现的完整方法(分支扩展gitHistoryVSCode)
还有其他想法,例如如何访问extension / git方法或模型属性?
我正在尝试通过 Windows Powershell 从远程 Exchange 服务器接收所有 TransportAgent 的状态。
我偶尔会收到一个错误,即The session state is Broken. 一旦它坏了,我需要创建一个新的会话
下面是我正在使用的命令列表(按正确顺序)
# Build the PSSession for Exchange
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<SERVER>/PowerShell/ -Authentication Default
# Invoke the command 'Get-TransportAgent' on the remote PSSession
Invoke-Command $Session {Get-TransportAgent}
# Result when there is NO ERROR
Identity Enabled Priority PSComputerName
-------- ------- -------- --------------
Transport Rule Agent True 1 <SERVER>
Malware Agent True 2 <SERVER>
Text Messaging Routing Agent True 3 <SERVER>
Text Messaging Delivery …Run Code Online (Sandbox Code Playgroud)