Complete the code to list all files and folders in the current directory.
Get-ChildItem [1]-Recurse when only the current directory is needed.-File which lists only files, not folders.The -Path . parameter tells Get-ChildItem to list items in the current directory.
Complete the code to list all files only in the current directory.
Get-ChildItem [1]-Directory which lists folders, not files.-Recurse which lists files in subfolders too.The -File parameter lists only files, excluding folders.
Fix the error in the code to list all items recursively.
Get-ChildItem [1]-File or -Directory alone does not recurse.-Recurse when subfolders are needed.The -Recurse parameter tells PowerShell to list all items in the current directory and all subdirectories.
Fill both blanks to list all items recursively including hidden ones.
Get-ChildItem [1] [2]
-File instead of -Force to include hidden items.-Recurse to include subfolders.-Recurse lists items in all subfolders, and -Force includes hidden items.
Fill all three blanks to list only directories recursively and show their full names.
Get-ChildItem [1] [2] | Select-Object [3]
-File instead of -Directory to list folders.Select-Object FullName to see full paths.-Recurse lists all subfolders, -Directory filters to folders only, and Select-Object FullName shows the full path of each folder.