• Narrow screen resolution
  • Wide screen resolution
  • Increase font size
  • Decrease font size
  • Default font size
  • default color
  • red color
© Diana Scherff, Amas-Veritas.com

Welcome to Amas Veritas [dot] com

Updates: Media (lyrics) has a new layout. I could never figure out how to lay it out, but it's easier to navigate now. I'm still working on a better duplicate Mamblog mod. I'm trying to make submittions easier but the poetry form died for some reason. Quizzes are also on their way from the old site. Joomla content isn't very code friendly so I'm having to rewrite old code. You can still click on News > AH v21 > Screen if you wish to use the quizzes.
 
Home arrow Tools arrow Windows PowerShell arrow Get-ItemProperty [gp]
Get-ItemProperty [gp] Print E-mail
Written by Diana, on 04-09-2007 02:17
Views 101    
Favoured None

PS C:\Users\Admin> help gp -full

NAME
    Get-ItemProperty

SYNOPSIS
    Retrieves the properties of a specified item.
SYNTAX
    Get-ItemProperty [-path] <string[]> [[-name] <string[]>] [-include <string[]>] [-exclude <string[]>] [-filter <string>] [-credential <PSCredential>] [<CommonParameters>]

    Get-ItemProperty [-literalPath] <string[]> [[-name] <string[]>] [-include <string[]>] [-exclude <string[]>] [-filter <string>] [-credential <PSCredential>] [<CommonParameters>]


DETAILED DESCRIPTION
    Retrieves the properties of a specified item.


PARAMETERS
    -path <string[]>
        Specifies the path to the item or items.

        Required?                    true
        Position?                    1
        Default value                current location
        Accept pipeline input?       true (ByValue, ByPropertyName)
        Accept wildcard characters?  true

    -name <string[]>
        Specifies the name of the property or properties to retrieve.

        Required?                    false
        Position?                    2
        Default value                String.empty
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -include <string[]>
        Includes the specified items.

        Required?                    false
        Position?                    named
        Default value
        Accept pipeline input?       false
        Accept wildcard characters?  true

    -exclude <string[]>
        Omits the specified items. Wildcards are permitted.

        Required?                    false
        Position?                    named
        Default value
        Accept pipeline input?       false
        Accept wildcard characters?  true

    -filter <string>
        Specifies a provider-specific filter.

        Required?                    false
        Position?                    named
        Default value
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -credential <PSCredential>
        Specifies the credential used to validate access. If a PSCredential object obtained earlier using get-credential is supplied, it will be used as is. If a user name is supplied,  there will be a prompt for a password.

        Required?                    false
        Position?                    named
        Default value
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters?  false

    -literalPath <string[]>
        Specifies a path to the item property. The value of -LiteralPath is used exactly as it is typed. No characters are interpreted as wildcards.  If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell Windows PowerShell not to interpret any characters as escape sequences.

        Required?                    true
        Position?                    1
        Default value
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters?  false

    <CommonParameters>
        This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, type, "get-help about_commonparameters".


INPUT TYPE



RETURN TYPE
    Object


    ----------------- EXAMPLE 1 -----------------

    C:\PS>get-itemproperty C:\Windows


    This nommand displays information about the C:\Windows directory.





    ----------------- EXAMPLE 2 -----------------

    C:\PS>get-itemproperty C:\Test\Weather.xls | format-list


    This command gets the properties of the C:\Test\Weather.xls file. The result is piped to the format-list cmdlet to display the output as a list.





    ----------------- EXAMPLE 3 -----------------

    C:\PS>get-itemproperty -path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion


    This command displays the value name and data of each of the registry entries contained in the CurrentVersion registry subkey. Note that the command requires that there is a psdrive named HKLM: that is mapped to the HKEY_LOCAL_MACHINE hive of the registry. A drive with that name and mapping is available in Windows PowerShell by default. Alternatively, the path to this registry subkey can be specified by using the following alternate path that begins with the provider name followed by two colons:
    Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion.





    ----------------- EXAMPLE 4 -----------------

    C:\PS>get-itemproperty -path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion `
    -name "ProgramFilesDir" | format-list ProgramFilesDir


    This command displays the value name and data of the ProgramFilesDir registry entry contained in the CurrentVersion registry subkey. The subkey is specified in the Path parameter and the value name of the entry is specified in the Name parameter. Note that the result of the Get-ItemProperty cmdlet is piped to the Format-List cmdlet to extract information about just the registry entry of interest. By default, Windows PowerShell property information is included in the output of Get-ItemProperty.






RELATED LINKS
    Set-ItemProperty
    Clear-ItemProperty
    Copy-ItemProperty
    Move-ItemProperty
    New-ItemProperty
    Remove-ItemProperty
    Rename-ItemProperty
    about_namespace


Last update: 04-09-2007 02:17

Published in : Tools, Windows PowerShell

Users' Comments (0) RSS feed comment

No comment posted

Add your comment



mXcomment 1.0.4 © 2007-2008 - visualclinic.fr
License Creative Commons - Some rights reserved
 
< Prev   Next >




Double click any word on this page for a definition.
Using Firefox? Enable definitions by downloading the extension.
Sorry, this feature does not currently work in Opera or Safari.

No Users Online

Statistics

OS: FreeBSD
PHP: 5.2.1
MySQL: 4.1.21-log
Time: 05:25
Caching: Disabled
GZIP: Disabled
Members: 35
News: 2446
Web Links: 39
Visitors: 1235426

Syndicate

Login

Particls