can you search help for a parameter ? "PrisContainer"

Harvey Lewis 1 Reputation point

I am looking for a way to tell files from Directories.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,622 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 35,036 Reputation points

    In what context?

    # get just directories
    Get-ChildItem c:\junk -Dir
    Get-ChildItem c:\junk | Where-Object {$_.PsIsContainer}
    # get just files
    Get-ChildItem c:\junk -File
    Get-ChildItem c:\junk | Where-Object {-Not $_.PsIsContainer}

  2. Limitless Technology 37,331 Reputation points

    Hi HarveyLewis-9057,

    Powershell can be used to identify folders and files and their properties:

    Get-ChildItem -Path C:\Test -Name
    Get-ItemProperty C:\Test\Weather.xls | Format-List

    The following article may be of use for finding out the required parameters:

    You may also find this useful:


    --If the reply is helpful, please Upvote and Accept as answer--