我试图从控制台获取分支缓存状态,但一直无法这样做
有一个命令Get-BCStatus,它返回下面的批量数据
GET-BCStatus
BranchCacheIsEnabled:False BranchCacheServiceStatus:已停止BranchCacheServiceStartType:Manual
ClientConfiguration:
CurrentClientMode : Disabled
HostedCacheServerList :
HostedCacheDiscoveryEnabled : False
内容服务器配置:
ContentServerIsEnabled : False
托管缓存服务器配置:
HostedCacheServerIsEnabled : False
ClientAuthenticationMode : Domain
HostedCacheScpRegistrationEnabled : False
我正在尝试使用powershell查询但是没有成功
我只需要分支缓存的状态而不需要其他任何东西
我尝试了下面的查询
Get-BCStatus | Where-Object {$_.BranchCacheIsEnabled}
我只需要False但它返回nil
Get-BCStatus | Select-Object -ExpandProperty BranchCacheIsEnabled
只需选择您想要的一个属性即可。您要求powershell获取-BCStatus,然后给出BranchCacheIsEnabled属性不为null的那些。但你的价值是假的,所以什么都没有返回。