Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更改Powershell会话中每个cmdlet的行为以传递详细标志_Powershell_Powershell 2.0_Verbose - Fatal编程技术网

更改Powershell会话中每个cmdlet的行为以传递详细标志

更改Powershell会话中每个cmdlet的行为以传递详细标志,powershell,powershell-2.0,verbose,Powershell,Powershell 2.0,Verbose,如果我想改变Powershell会话中每个cmdlet的行为以传递详细标志,我可以在Powershell v3中使用$PSDefaultParameterValues这样做 $PSDefaultParameterValues['*:Verbose'] = $true Powershell v2可能的解决方法是什么?不,这是Powershell 3.0及更高版本中的一个“新”功能:$VerbosePreference='Continue'我不认为这是我想要的。这只是针对已经传递了详细标志的命令设

如果我想改变Powershell会话中每个cmdlet的行为以传递详细标志,我可以在Powershell v3中使用$PSDefaultParameterValues这样做

$PSDefaultParameterValues['*:Verbose'] = $true

Powershell v2可能的解决方法是什么?

不,这是Powershell 3.0及更高版本中的一个“新”功能:

$VerbosePreference='Continue'
我不认为这是我想要的。这只是针对已经传递了详细标志的命令设置详细首选项。