The PowerShell pipeline deals with objects, not just the text stream that the Unix pipeline does. All variables are instances of objects. These are all .NET, BTW objects.
Here, part of the output of the ls command is passed to the get-member cmdlet:
PS C:\Documents and Settings\Administrator.DEV-3DPST1-SWK> ls | get-member TypeName: System.IO.DirectoryInfo Name MemberType Definition ---- ---------- ---------- Create Method System.Void Create(DirectorySecurity directorySecurity), System.Void Create() CreateObjRef Method System.Runtime.Remoting.ObjRef CreateObjRef(Type requestedType) CreateSubdirectory Method System.IO.DirectoryInfo CreateSubdirectory(String path), System.IO.Director... Delete Method System.Void Delete(), System.Void Delete(Boolean recursive) Equals Method System.Boolean Equals(Object obj) GetAccessControl Method System.Security.AccessControl.DirectorySecurity GetAccessControl(), System.... GetDirectories Method System.IO.DirectoryInfo[] GetDirectories(String searchPattern), System.IO.D... GetFiles Method System.IO.FileInfo[] GetFiles(String searchPattern), System.IO.FileInfo[] G... GetFileSystemInfos Method System.IO.FileSystemInfo[] GetFileSystemInfos(String searchPattern), System... GetHashCode Method System.Int32 GetHashCode() GetLifetimeService Method System.Object GetLifetimeService() GetObjectData Method System.Void GetObjectData(SerializationInfo info, StreamingContext context) GetType Method System.Type GetType() get_Attributes Method System.IO.FileAttributes get_Attributes() get_CreationTime Method System.DateTime get_CreationTime()
get-member displays the elements of the object you are connecting to. You can see that these are real members of the System.IO.DirectoryInfo class.
John saunders
source share