[英]Remote Windows Computer OS Root Drive Letter
如何通过Windows命令提示符或Power Shell命令在带有Windows操作系统的远程计算机上找到os
根驱动器的盘符(例如C或D等)。
在本地PC中,“ set systemroot ”命令可以获取Windows根驱动器,但我希望此等效命令适用于远程计算机...
查询WMI,Win32_OperatingSystem类;
操作系统驱动器号
Get-CimInstance -Class Win32_OperatingSystem -ComputerName localhost -Property SystemDrive | Select-Object -ExpandProperty SystemDrive
要么
Get-WmiObject -Class Win32_OperatingSystem -ComputerName localhost -Property SystemDrive | Select-Object -ExpandProperty SystemDrive
Windows目录
Get-CimInstance -Class Win32_OperatingSystem -ComputerName localhost -Property WindowsDirectory | Select-Object -ExpandProperty WindowsDirectory
要么
Get-WmiObject -Class Win32_OperatingSystem -ComputerName localhost -Property WindowsDirectory | Select-Object -ExpandProperty WindowsDirectory
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.