0

I have written two lines of code in PowerShell, but only the first line runs. The second line is ignored. Any reason why?

GET-ITEM IIS:\AppPools\TestOne | SELECT -EXPANDPROPERTY ProcessModel | SELECT identityType, userName,password,idleTimeout;
GET-ITEM IIS:\AppPools\TestOne | SELECT -EXPANDPROPERTY CPU | SELECT action
SoSo
  • 13
  • 2
  • 2
    Does this answer your question? [Why is the output format changed when running two PowerShell commands in one line?](https://stackoverflow.com/questions/55502047/why-is-the-output-format-changed-when-running-two-powershell-commands-in-one-lin), see also: [#13906 Add -UnifyProperties parameter to Select-Object](https://github.com/PowerShell/PowerShell/issues/13906) – iRon Jan 12 '21 at 17:26
  • Especially this: _"If Format-Table is locked in, the first non-primitive object alone determines the set of properties displayed as table columns, which can cause subsequent objects to seemingly disappear if they don't have these properties"_ – zett42 Jan 12 '21 at 17:31

0 Answers0