2020/08/03 #-OutVariable オプション
皆様おはようございます、
#猫でもできるPowerShell(備忘録)
#-OutVariable オプション
PS>
Get-Process PowerShell -OutVariable out
Get-Process iexplore -OutVariable +out
$out
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
632 32 59108 67612 0.95 864 1 powershell
1536 282 274764 175304 1,045.95 2676 1 iexplore
1760 345 354368 227948 2,392.97 3244 1 iexplore
1130 152 255984 129640 7,346.36 6680 1 iexplore
1295 92 65028 72676 1,163.66 8992 1 iexplore
632 32 59108 67612 0.95 864 1 powershell
1536 282 274764 175304 1,045.95 2676 1 iexplore
-PipelineVariable をようやく理解し始めましたが
-OutVariable なるオプションが有りました
2回目以降の登場で '+' を付ける事で中身が累積するようです
何かのログ取りに使える、か?
ではまた;
"
#猫でもできるPowerShell(備忘録)
#-OutVariable オプション
PS>
Get-Process PowerShell -OutVariable out
Get-Process iexplore -OutVariable +out
$out
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
632 32 59108 67612 0.95 864 1 powershell
1536 282 274764 175304 1,045.95 2676 1 iexplore
1760 345 354368 227948 2,392.97 3244 1 iexplore
1130 152 255984 129640 7,346.36 6680 1 iexplore
1295 92 65028 72676 1,163.66 8992 1 iexplore
632 32 59108 67612 0.95 864 1 powershell
1536 282 274764 175304 1,045.95 2676 1 iexplore
-PipelineVariable をようやく理解し始めましたが
-OutVariable なるオプションが有りました
2回目以降の登場で '+' を付ける事で中身が累積するようです
何かのログ取りに使える、か?
ではまた;
"