- OS : Windows 10 Version 1909
- blog : blog.csdn.net/shiwanwu
- typesetting : Markdown
In cmd, when viewing help wmic, suggesting that "WMIC deprecated"
Microsoft Windows [版本 10.0.18363.592]
(c) 2019 Microsoft Corporation。保留所有权利。
C:\Users\Student>wmic /?
WMIC 已弃用。
[全局开关] <命令>
可以使用以下全局开关:
/NAMESPACE 别名在其上操作的命名空间的路径。
/ROLE 包含别名定义的角色的路径。
/NODE 别名在其上操作的服务器。
/IMPLEVEL 客户端模拟级别。
/AUTHLEVEL 客户端身份验证级别。
/LOCALE 客户端应使用的语言 ID。
/PRIVILEGES 启用或禁用所有权限。
/TRACE 将调试信息输出到 stderr。
/RECORD 记录所有输入命令和输出内容。
/INTERACTIVE 设置或重置交互模式。
/FAILFAST 设置或重置 FailFast 模式。
/USER 会话期间要使用的用户。
/PASSWORD 登录会话时要使用的密码。
/OUTPUT 指定输出重定向模式。
/APPEND 指定输出重定向模式。
/AGGREGATE 设置或重置聚合模式。
/AUTHORITY 指定连接的 <授权类型>。
/?[:<BRIEF|FULL>] 用法信息。
有关特定全局开关的详细信息,请键入: switch-name /?
C:\Users\Student>
powershell的Get-WmiObject
By looking for information, WQR1994 blogger pointed out that "it is a substitute for powershell's Get-WmiObject."
Viewed on the machine
Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。
尝试新的跨平台 PowerShell https://aka.ms/pscore6
PS C:\Users\Student> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.18362.145
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS C:\Users\Student> help Get-WmiObject
名称
Get-WmiObject
语法
Get-WmiObject [-Class] <string> [[-Property] <string[]>] [<CommonParameters>]
Get-WmiObject [[-Class] <string>] [<CommonParameters>]
Get-WmiObject [<CommonParameters>]
Get-WmiObject [<CommonParameters>]
Get-WmiObject [<CommonParameters>]
别名
gwmi
备注
Get-Help 在此计算机上找不到该 cmdlet 的帮助文件。它仅显示部分帮助。
-- 若要下载并安装包含此 cmdlet 的模块的帮助文件,请使用 Update-Help。
-- 若要联机查看此 cmdlet 的帮助主题,请键入: "Get-Help Get-WmiObject -Online" 或
转到 https://go.microsoft.com/fwlink/?LinkID=113337。
PS C:\Users\Student>
powershell的Get-CimInstance
By reading the manual page for help Get-WmiObject and found this sentence:
- Starting in PowerShell 3.0, this cmdlet has been superseded by Get-CimInstance.
So, I suggest that students from PowerShell 3.0, and learn Get-CimInstance better.
Viewed on the machine
PS C:\Users\Student> help Get-CimInstance
名称
Get-CimInstance
语法
Get-CimInstance [-ClassName] <string> [<CommonParameters>]
Get-CimInstance [-InputObject] <ciminstance> [<CommonParameters>]
Get-CimInstance [<CommonParameters>]
Get-CimInstance [-ClassName] <string> [<CommonParameters>]
Get-CimInstance [<CommonParameters>]
Get-CimInstance [<CommonParameters>]
Get-CimInstance [-InputObject] <ciminstance> [<CommonParameters>]
Get-CimInstance [<CommonParameters>]
别名
gcim
备注
Get-Help 在此计算机上找不到该 cmdlet 的帮助文件。它仅显示部分帮助。
-- 若要下载并安装包含此 cmdlet 的模块的帮助文件,请使用 Update-Help。
-- 若要联机查看此 cmdlet 的帮助主题,请键入: "Get-Help Get-CimInstance -Online" 或
转到 https://go.microsoft.com/fwlink/?LinkId=227961。
PS C:\Users\Student>
reference
- https://blog.csdn.net/WQR1994/article/details/100584671
- https://docs.microsoft.com/zh-cn/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1&viewFallbackFrom=powershell-3.0
- https://www.pstips.net/get-wmiobject-becomes-obsolete.html
- https://docs.microsoft.com/en-us/powershell/module/cimcmdlets/get-ciminstance?view=powershell-5.1
resource
- [ doc - cmd ] docs.microsoft.com/zh-cn/windows-server/administration/windows-commands/windows-commands
- [Doc - OS] docs.microsoft.com/zh-cn/windows
- [ msdn ] msdn.microsoft.com/zh-cn
- [Platform] www.csdn.net
Thanksgiving has helped people over the division of all things.
cmd can perform common tasks, simple and fast start command, the proposed study.
There is spare capacity, you can look at PowerShell, PowerShell Core and Linux Shell.