2009-11-11 53 views

回答

7

如果你正在实施一个PSCmdlet使用this变量来访问它,像这样:

this.SessionState.PSVariable.GetValue() 
+1

或更短:this.GetVariableValue(...) – 2013-12-29 16:31:58

+0

是否有一个'System.Management的选项。 Automation.Cmdlet'? – craig 2016-09-09 13:07:10