powershell_day1——基础操作
1. 基本使用
打开windows powershell

GUI:

2. 命令:
基本可以使用get-command找到自己想要的功能,特别的多。同时可以结合get-help来查看具体的命令的help。看到支持的参数。就是linux下的-h
比如我想查看process。那么就可以使用get-help Get-Process



3. 如何debug powershell
搜索powershell ISE工具,打断点,然后就和正常的debug工具一样了

4. 报错解决
Unable to find type [VMware.VimAutomation.Sdk.Util10.ProductInfo]. Make sure
that the assembly that contains this type is loaded.
At C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-Pow
erCLIEnvironment.ps1:71 char:1
+ $powerCliFriendlyVersion =
[VMware.VimAutomation.Sdk.Util10.ProductInfo]::PowerC ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : InvalidOperation: (VMware.VimAutom...l10.Product
Info:TypeName) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TypeNotFound

浙公网安备 33010602011771号