Answered by:
Powershell and pipeline

Question
-
Hello I want to know if this command can be written without the pipelines(vertical lines)?
"$u=gwmi Win32_Volume|?{$_.Label -eq'_'}|select name;cd $u.name;.\d.cmd"
Tuesday, December 3, 2019 2:49 PM
Answers
-
Hey,Try this:
$u=gwmi Win32_Volume -Property Label,Name -Filter "Label='_'";cd $u.name;.\d.cmd
- Marked as answer by jbimard Tuesday, December 3, 2019 6:21 PM
Tuesday, December 3, 2019 3:45 PM -
All replies
-
Why?
Live long and prosper!
(79,108,97,102|%{[char]$_})-join''
Tuesday, December 3, 2019 2:59 PM -
I'm using a USB that also functions as a keyboard and I try it to run this script in Powershell but the Latin American keyboard doesn't have a determine pipeline key
powershell "$u=gwmi Win32_Volume|?{$_.Label -eq'_'}|select name;cd $u.name;.\d.cmd"
Tuesday, December 3, 2019 3:12 PM -
Hey,Try this:
$u=gwmi Win32_Volume -Property Label,Name -Filter "Label='_'";cd $u.name;.\d.cmd
- Marked as answer by jbimard Tuesday, December 3, 2019 6:21 PM
Tuesday, December 3, 2019 3:45 PM -
... but the Latin American keyboard doesn't have a determine pipeline key ...
Live long and prosper!
(79,108,97,102|%{[char]$_})-join''
Tuesday, December 3, 2019 3:50 PM -