3テラバイト

プログラム関連備忘録サイト。主にゲーム。

PowerShell

PowerShellでディレクトリ内のファイル一覧を取得するコマンドレットGet-ChildItemの使い方

投稿日:

こんにちは、今日はPowerShellでディレクトリ内のファイル一覧を取得するコマンドレットGet-ChildItemの使い方についてまとめていきます。

確認環境

PSVersion 5.1.18362.1110

Get-ChildItemの使い方

実行すると現在のディレクトリ内にあるディレクトリやファイルに一覧が表示されます。

PS C:\Users\santerabyte> Get-ChildItem


    ディレクトリ: C:\Users\santerabyte


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       2020/11/09     23:30                Test

リンク

Get-ChildItem (Microsoft.PowerShell.Management) – PowerShell | Microsoft Docs
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7

-PowerShell


comment

メールアドレスが公開されることはありません。

関連記事

no image

PowerShellでコマンドのあるパスを取得する

確認環境 PowerShell 5.1 コマンドのパスを取得する Get-Commandコマンドレットにコマンド名を渡すと、Source列にてそのコマンドのパスが確認できます。 PS C:\Users …

no image

PowerShellでWindows Management Instrumentation (WMI)オブジェクトを取得するコマンドレットGet-WmiObjectの使い方

こんにちは、今日はPowerShellでWindows Management Instrumentation (WMI)オブジェクトを取得するコマンドレットGet-WmiObjectの使い方についてま …

no image

PowerShellで実行ポリシーを設定するコマンドレットSet-ExecutionPolicyの使い方

こんにちは、今日はPowerShellで実行ポリシーを設定するコマンドレットSet-ExecutionPolicyの使い方についてまとめていきます。 確認環境 PSVersion 5.1.18362. …

no image

PowerShellでアイテムを削除するコマンドレットRemove-Itemの使い方

こんにちは、今日はPowerShellでアイテムを削除するコマンドレットRemove-Itemの使い方についてまとめていきます。 確認環境 PSVersion 5.1.18362.1110 Remov …

no image

PowerShellでアイテムのプロパティを設定するコマンドレットSet-ItemPropertyの使い方

こんにちは、今日はPowerShellでアイテムのプロパティを設定するコマンドレットSet-ItemPropertyの使い方についてまとめていきます。 確認環境 PSVersion 5.1.18362 …