+ -
当前位置:首页 → 问答吧 → PowerShell: Get help on Type Conversion

PowerShell: Get help on Type Conversion

时间:2014-06-06

来源:互联网

I am a newbie, and am reading a copy of Windows PowerShell 2 for Dummies. Somewhere it suggests me to get help on type conversion. I tried:

get-help Type Conversion
get-help TypeConversion
get-help(typeconversion)

All without success. Can anyone advise how to get-help on type conversion? Thanks.

作者: lam2070   发布时间: 2014-06-06

http://blogs.msdn.com/b/powershe ... nversion-magic.aspx

直接去MS搵啦

作者: skww   发布时间: 2014-06-06

Thanks skww. Unfortunately I am asking here because I could not find the answer on MS. Your link is not useful to me.

[ 本帖最后由 lam2070 於 2014-5-21 09:41 PM 编辑 ]

作者: lam2070   发布时间: 2014-06-06

引用:原帖由 lam2070 於 2014-5-21 07:24 PM 发表
Thanks skww. Unfortunately I am asking here because I could not find the answer on MS. Your link is not useful to me.
get-help
is for cmdlet help, not general help for type conversion. Powershell is very intelligent and try to convert it for you by best guess. e.g. if you type PS> $i = 3 + "4". Then it will convert automatically to integer and result is 7.If you type PS> $i = "4" + 3. The result of $i is "43" instead. So you need to know the rule of type conversion (priority, default etc) before you can get-help for related cmdlets.

作者: kk517   发布时间: 2014-06-07

get-help about_ | select name, synopsis | select-string type

to look for some topics available

作者: lohengrin   发布时间: 2014-06-07