azure - 使用 Azure RUN 命令的 Get-Service 命令脚本响应未显示 Azure 虚拟机的所有列值
问题描述
我需要 azure 虚拟机中存在的服务。
在 Azure 门户中使用 RUN 命令,我执行了以下 power shell 脚本。
Get-Service | select -property name,status,displayname
输出(样本)是:
vmicrdv Running Hyper-V Remote Desktop Virtualization Service
vmicshutdown Running Hyper-V Guest Shutdown Service
vmictimesync Running Hyper-V Time Synchronization Service
现在,为了获得响应的服务启动类型,将输入命令修改为:
Get-Service | select -property name,status,displayname,starttype
脚本响应是:
Running vmicrdv Hyper-V Remote Desktop Virtualization Service
Running vmicshutdown Hyper-V Guest Shutdown Service
Running vmictimesync Hyper-V Time Synchronization Service
脚本响应不正确。
- 它不包含起始类型列值
- 列的顺序不正确
这个问题来自 Azure 方面吗?我错过了一些细节吗?有什么建议么。
解决方案
您应该运行此命令。
(获取服务)| 选择-对象名称、状态、显示名称、开始类型
PS C:\Users\taguada>(获取服务)| 选择-对象名称、状态、显示名称、开始类型 名称 状态 DisplayName StartType ---- ------ ------------ --------- AarSvc_2aa0c 停止 AarSvc_2aa0c 手册 AJRouter 停止 AllJoyn 路由器服务手册 ALG 停止应用层网关服务手册 AppIDSvc 已停止应用程序身份手册 Appinfo 运行应用信息手册 AppleOSSMgr 自动运行 Apple OS 切换管理器 AppMgmt 已停止应用程序管理手册 AppReadiness Stopped App Readiness Manual AppVClient 已停止 Microsoft App-V 客户端已禁用
推荐阅读
- android - 如何在 Switch/SwitchCompat 按钮中设置宽度和跟踪文本并实现此结果?(附图片和GIF)
- c - .so 文件如何查找符号?
- ios - 我们如何在 swift 4 和 IOS 11 中更改语音识别语言?
- dask - 是否有计划将#Dask 仪表板与 Juoyter 项目集成
- sql - 对某些分组行求和
- javascript - 在 React 中更新对象数组的几个属性(onClick={在 setState 上将摄氏更改为华氏})
- sql-server - 使用 sql server 解析嵌套的 xml
- javascript - 如何从引导 datepicker 输出 iso 周和年?
- ios - iOS 应用因使用 WhatsApp 而被拒绝
- javascript - 服务人员没有被承诺不知道在哪里