Power Shell FTP模块(WebAdministration)中的属性是否区分大小写? [英] Are the properties in Power Shell FTP module(WebAdministration) Case-Sensitive?
问题描述
PowerShell是不区分大小写的语言,WebAdministration
之类的模块也是这样.
这不起作用:
PS IIS:\AppPools> Set-ItemProperty .\DefaultAppPool -Name Enable32BitAppOnWin64 -Value $true
这可行:
PS IIS:\AppPools> Set-ItemProperty .\DefaultAppPool -Name enable32BitAppOnWin64 -Value $true
仅在大写字母之间有区别,在属性名称中只有小写字母"e". 而且,第一个命令甚至不会引发任何错误.
任何人都可以解释这种行为吗?
这可能是一个错误,因为对于不同的Windows版本,其行为是不同的(例如,对于Windows 10,首字母必须小写,而对于Windows 7,首字母必须小写)./p>
关于SO的还有一个相关问题.
PowerShell is case insensitive language and so are the modules like WebAdministration
expected to be.
This doesn't work:
PS IIS:\AppPools> Set-ItemProperty .\DefaultAppPool -Name Enable32BitAppOnWin64 -Value $true
Whereas this works:
PS IIS:\AppPools> Set-ItemProperty .\DefaultAppPool -Name enable32BitAppOnWin64 -Value $true
Difference is only in capital and small letter 'e' in property name. Moreover, the first command doesn't even throw any error.
Can anyone explain this behaviour?
This is probably a bug since the behaviour differs for different Windows versions (e. g. for Windows 10, the first letter must be lowercase whereas for Windows 7 not).
There is also a related question on SO.
这篇关于Power Shell FTP模块(WebAdministration)中的属性是否区分大小写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!