PowerShell Logo Small

Get-ItemPropertyValue



This is the built-in help made by Microsoft for the command 'Get-ItemPropertyValue', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Gets the value for one or more properties of a specified item.

SYNTAX


Get-ItemPropertyValue [[-Path] [<String[]>]] [-Name] <String[]> [-Credential [<PSCredential>]] [-Exclude [<String[]>]] [-Filter [<String>]] [-Include [<String[]>]]
[-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-UseTransaction [<SwitchParameter>]]
[<CommonParameters>]
Get-ItemPropertyValue [-Name] <String[]> [-Credential [<PSCredential>]] [-Exclude [<String[]>]] [-Filter [<String>]] [-Include [<String[]>]] [-InformationAction
{SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] -LiteralPath <String[]> [-UseTransaction [<SwitchParameter>]]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


Get-ItemPropertyValue gets the current value for a property that you specify by using the Name parameter, located in a path that you specify with either the Path or
LiteralPath parameters.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=389281
Get-ItemProperty
Clear-ItemProperty
Copy-ItemProperty
Move-ItemProperty
New-ItemProperty
Remove-ItemProperty
Rename-ItemProperty
Set-ItemProperty
about_Providers

REMARKS

<

Examples


Example 1: Get the value of the ProductID property

PS C:\>Get-ItemPropertyValue HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion -Name ProductID
94253-50000-11141-AA785



In the following example, you get the value of the ProductID property of the \SOFTWARE\Microsoft\Windows NT\CurrentVersion object in the Windows Registry provider.






Example 2: Get the last write time of a file or folder

PS C:\>Get-ItemPropertyValue -Path C:\Users\Test\Documents\ModuleToAssembly -Name LastWriteTime
Wednesday, September 3, 2014 2:53:22 PM



In the following example, you get the value of the LastWriteTime property, or the last time a file or folder was changed, from the C:\Users\Test\Documents\ModuleToAssembly
folder, working in the FileSystem provider.






Example 3: Get multiple property values of a file or folder

PS C:\>Get-ItemPropertyValue -Path C:\Users\Test\Documents\ModuleToAssembly -Name LastWriteTime,CreationTime,Root

Wednesday, September 3, 2014 2:53:22 PM
Wednesday, September 3, 2014 2:53:10 PM

Name : C:\
Parent :
Exists : True
Root : C:\
FullName : C:\
Extension :
CreationTime : 9/1/2014 4:59:45 AM
CreationTimeUtc : 9/1/2014 11:59:45 AM
LastAccessTime : 9/27/2014 5:22:02 PM
LastAccessTimeUtc : 9/28/2014 12:22:02 AM
LastWriteTime : 9/27/2014 5:22:02 PM
LastWriteTimeUtc : 9/28/2014 12:22:02 AM
Attributes : Hidden, System, Directory
BaseName : C:\
Target :
LinkType :
Mode : d--hs-



This example gets the values of the LastWriteTime, CreationTime, and Root properties of a folder. The property values are returned in the order in which you specified the
property names.