利用Splatting提交参数(Hash,哈希)
$infos
= @{}
$infos
.Path =
'c:\Windows'
$infos
.Recurse =
$true
$infos
.
Filter
=
'*.log'
$infos
.ErrorAction =
'SilentlyContinue'
$infos
.Remove(
'Recurse'
)
dir
@infos
dir c:\windows -rexurse -filter ‘*.log’ -erroraction silentlycontinue