2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PowerShellの出力結果がきれたら

Posted at

PowerShell のコマンドレットで実行結果が最後まで表示されないことありませんか?

例として、Get-AppxPackage Microsoft.ScreenSketch の実行結果にある Dependencies のところを横にスクロースすると、最後が ... となり、実行結果が最後まで確認できません。

Get-AppxPackage Microsoft.ScreenSketch
出力結果
Name              : Microsoft.ScreenSketch
Publisher         : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture      : X64
ResourceId        :
Version           : 11.2409.25.0
PackageFullName   : Microsoft.ScreenSketch_11.2409.25.0_x64__8wekyb3d8bbwe
InstallLocation   : C:\Program Files\WindowsApps\Microsoft.ScreenSketch_11.2409.25.0_x64__8wekyb3d8bbwe
IsFramework       : False
PackageFamilyName : Microsoft.ScreenSketch_8wekyb3d8bbwe
PublisherId       : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
NonRemovable      : False
Dependencies      : {Microsoft.UI.Xaml.2.8_8.2310.30001.0_x64__8wekyb3d8bbwe, Microsoft.WindowsAppRuntime.1.5_5001.275.500.0_x64__8wekyb3d8bbwe, Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe, Microsoft.VCLibs.140.00.UWPDesktop_14.0.33728.0_x64__8wekyb3d8bbwe...}
IsPartiallyStaged : False
SignatureKind     : Store
Status            : Ok

PowerShell でコマンドレットの出力結果に ... が出力される場合には、すべての情報が出力されておらず、省略されています。
その場合、コマンドレット実行前に FormatEnumerationLimit を -1 に設定してあげれば実行結果が省略されずに表示されます。

$FormatEnumerationLimit = -1
Get-AppxPackage Microsoft.ScreenSketch
出力結果
Name              : Microsoft.ScreenSketch
Publisher         : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture      : X64
ResourceId        :
Version           : 11.2409.25.0
PackageFullName   : Microsoft.ScreenSketch_11.2409.25.0_x64__8wekyb3d8bbwe
InstallLocation   : C:\Program Files\WindowsApps\Microsoft.ScreenSketch_11.2409.25.0_x64__8wekyb3d8bbwe
IsFramework       : False
PackageFamilyName : Microsoft.ScreenSketch_8wekyb3d8bbwe
PublisherId       : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
NonRemovable      : False
Dependencies      : {Microsoft.UI.Xaml.2.8_8.2310.30001.0_x64__8wekyb3d8bbwe, Microsoft.WindowsAppRuntime.1.5_5001.275.500.0_x64__8wekyb3d8bbwe, Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe, Microsoft.VCLibs.140.00.UWPDesktop_14.0.33728.0_x64__8wekyb3d8bbwe, Microsoft.ScreenSketch_11.2409.25.0_neutral_split.language-de_8wekyb3d8bbwe, Microsoft.ScreenSketch_11.2409.25.0_neutral_split.language-ja_8wekyb3d8bbwe, Microsoft.ScreenSketch_11.2409.25.0_neutral_split.scale-100_8wekyb3d8bbwe, Microsoft.ScreenSketch_11.2409.25.0_neutral_split.scale-125_8wekyb3d8bbwe, Microsoft.ScreenSketch_11.2409.25.0_neutral_split.scale-150_8wekyb3d8bbwe}
IsPartiallyStaged : False
SignatureKind     : Store
Status            : Ok

参考URL

about_Preference_Variables - PowerShell | Microsoft Learn
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?