[英]Get-FileHash on vmdk file using PowerCLI
I am new to PowerCLI, and I am having little difficulties. 我是PowerCLI的新手,并且我遇到的困难很小。 I need to calculate a hash on a vmdk file (around 50GB), I want to do this using PowerCLI, which has the following command: 我需要计算vmdk文件(大约50GB)上的哈希,我想使用PowerCLI来执行此操作,该命令具有以下命令:
Get-FileHash <filepath> -Algorithm MD5
I am connecting to my vsphare with the following command: 我正在使用以下命令连接到我的vsphare:
Connect-VIServer -Server servername -User user -Password pass
Get-Template -Name tempName | Get-HardDisk
gives me the following 给我以下
CapacityGB Persistence Filename
---------- ----------- --------
60.000 Persistent [CCT_VMs_22] tempName/tempName.vmdk
but I cant use the Get-FileHash on the above. 但是我不能在上面使用Get-FileHash。
any ideas what to do? 有什么想法怎么办?
Get-filehash is a native powershell command and not part of the VMware PowerCLI module, you'd need to copy the vmdk file to a windows box somewhere before you can use Get-FileHash. Get-filehash是一个本机Powershell命令,不是VMware PowerCLI模块的一部分,您需要将vmdk文件复制到Windows框中的某个位置,然后才能使用Get-FileHash。
You could use PSCP to copy the file locally then do Get-FileHash. 您可以使用PSCP在本地复制文件,然后执行Get-FileHash。
PowerCLI also has a native way to do file copies to your local machine here: PowerCLI还具有一种将文件复制到本地计算机的本地方法:
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2001041 https://kb.vmware.com/selfservice/microsites/search.do?language=zh_CN&cmd=displayKC&externalId=2001041
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.