about_properties.help

about_properties.help - TOPIC about_Properties SHORT...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 TOPIC about_Properties SHORT DESCRIPTION Describes how to use object properties in Windows PowerShell. LONG DESCRIPTION Windows PowerShell uses structured collections of information called objects to represent the items in data stores or the state of the computer. Typically, you work with object that are part of the Microsoft .NET Framework, but you can also create custom objects in Windows PowerShell. The association between an item and its object is very close. When you change an object, you change the item that it represents. For example, when you get a file in Windows PowerShell, you do not get the actual file. Instead, you get a FileInfo object that represents the file. When you change the FileInfo object, the file changes too. Most objects have properties. Properties are the data that is associated with an object. This data describes the object. For example, a FileInfo object has a property called Length that describes the size of the file that is represented by the object. Object Properties To list the properties of an object, use the Get-Member cmdlet. For example, to get the properties of a FileInfo object, use the Get-ChildItem cmdlet to get the FileInfo object that represents a file. Then, use a pipeline operator (|) to send the FileInfo object to Get-Member. The following command gets the PowerShell.exe file and sends it to Get-Member. The $Pshome automatic variable contains the path of the Windows PowerShell installation directory. get-childitem $pshome\powershell.exe | get-member
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/03/2010 for the course BUS fin taught by Professor Fez during the Spring '10 term at Valparaiso.

Page1 / 3

about_properties.help - TOPIC about_Properties SHORT...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online