Windows 2008 R2 powershell术语“Get-Disk”无法识别为cmdlet的
使用Get-Disk cmdlet时出错
Windows版本:Microsoft Windows Server 2008 R2 SP1 64b Windows 2008 R2 powershell术语“Get-Disk”无法识别为cmdlet的名称.我有Powershell的第3版
Get-Disk : The term 'Get-Disk' is not recognized as the name of a cmdlet,function,script file,or operable program. Check the spelling of the name,or if a path was included,verify that the path is correct and try again. At line:1 char:1 + Get-Disk + ~~~~~~~~ + CategoryInfo : ObjectNotFound: (Get-Disk:String) [],CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Name Value ---- ----- WSManStackVersion 3.0 PSCompatibleVersions {1.0,2.0,3.0} SerializationVersion 1.1.0.1 BuildVersion 6.2.9200.16398 PSVersion 3.0 CLRVersion 4.0.30319.1 PSRemotingProtocolVersion 2.2 解决方法
[只是将评论结合到答案中并添加了一点]
我还希望在Azure VM Server 2008 R2上使用Get-Disk命令,我安装的PowerShell 3.0和Get-Disk仍然不可用,然后用Google搜索到此页面. 从这个Scripting Guy blog link开始,它提到了这一点
因此,如果您希望在Windows Server 2008 R2上使用Get-Disk,那么您无法做到. 相同的Scripting Guy链接还提供了可以使用的相关DiskPart命令. From an elevated shell: DiskPart.exe List disk Select disk 1—disk 1 being the USB drive Clean Create partition primary Select partition 1—partition 1 being the new partition Active Format FS=NTFS (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |