PageSourceSearch

https://psframework.org/assets/js/803a2d9f.d8f57e47.js

js psframework.org collected 2026-10-02 10:16:46 UTC 8,501 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkpsframework=self.webpackChunkpsframework||[]).push([[2484],{28453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>s});var a=t(96540);const r={},i=a.createContext(r);function l(e){const n=a.useContext(i);return a.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),a.createElement(i.Provider,{value:n},e.children)}},65472:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>l,metadata:()=>a,toc:()=>d});const a=JSON.parse('{"id":"Commands/PSUtil/Expand-PSUObject","title":"Expand-PSUObject","description":"SYNOPSIS","source":"@site/docs/Commands/PSUtil/Expand-PSUObject.md","sourceDirName":"Commands/PSUtil","slug":"/Commands/PSUtil/Expand-PSUObject","permalink":"/docs/Commands/PSUtil/Expand-PSUObject","draft":false,"unlisted":false,"editUrl":"https://github.com/PowershellFrameworkCollective/docs-psframework/docs/Commands/PSUtil/Expand-PSUObject.md","tags":[],"version":"current","frontMatter":{"external help file":"PSUtil-help.xml","Module Name":"PSUtil","online version":null,"schema":"2.0.0"},"sidebar":"commandsSidebar","previous":{"title":"Convert-PSUObject","permalink":"/docs/Commands/PSUtil/Convert-PSUObject"},"next":{"title":"Get-PSUCalendarWeek","permalink":"/docs/Commands/PSUtil/Get-PSUCalendarWeek"}}');var r=t(74848),i=t(28453);const l={"external help file":"PSUtil-help.xml","Module Name":"PSUtil","online version":null,schema:"2.0.0"},s="Expand-PSUObject",c={},d=[{value:"SYNOPSIS",id:"synopsis",level:2},{value:"SYNTAX",id:"syntax",level:2},{value:"Equals (Default)",id:"equals-default",level:3},{value:"Match",id:"match",level:3},{value:"Like",id:"like",level:3},{value:"DESCRIPTION",id:"description",level:2},{value:"EXAMPLES",id:"examples",level:2},{value:"EXAMPLE 1",id:"example-1",level:3},{value:"EXAMPLE 2",id:"example-2",level:3},{value:"EXAMPLE 3",id:"example-3",level:3},{value:"PARAMETERS",id:"parameters",level:2},{value:"-Name",id:"-name",level:3},{value:"-Like",id:"-like",level:3},{value:"-Match",id:"-match",level:3},{value:"-InputObject",id:"-inputobject",level:3},{value:"CommonParameters",id:"commonparameters",level:3},{value:"INPUTS",id:"inputs",level:2},{value:"OUTPUTS",id:"outputs",level:2},{value:"NOTES",id:"notes",level:2},{value:"RELATED LINKS",id:"related-links",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"expand-psuobject",children:"Expand-PSUObject"})}),"\n",(0,r.jsx)(n.h2,{id:"synopsis",children:"SYNOPSIS"}),"\n",(0,r.jsx)(n.p,{children:"A comfortable replacement for Select-Object -ExpandProperty."}),"\n",(0,r.jsx)(n.h2,{id:"syntax",children:"SYNTAX"}),"\n",(0,r.jsx)(n.h3,{id:"equals-default",children:"Equals (Default)"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"Expand-PSUObject [[-Name] <String>] [-InputObject <Object>] [<CommonParameters>]\n"})}),"\n",(0,r.jsx)(n.h3,{id:"match",children:"Match"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"Expand-PSUObject [-Name] <String> [-Match] [-InputObject <Object>] [<CommonParameters>]\n"})}),"\n",(0,r.jsx)(n.h3,{id:"like",children:"Like"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"Expand-PSUObject [-Name] <String> [-Like] [-InputObject <Object>] [<CommonParameters>]\n"})}),"\n",(0,r.jsx)(n.h2,{id:"description",children:"DESCRIPTION"}),"\n",(0,r.jsx)(n.p,{children:"A comfortable replacement for Select-Object -ExpandProperty.\nAllows extracting properties with less typing and more flexibility:"}),"\n",(0,r.jsx)(n.p,{children:"Preferred Properties:\nBy defining a list of property-names in $DefaultExpandedProperties the user can determine his own list of preferred properties to expand.\nThis allows using this command without specifying a property at all.\nIt will then check the first object for the property to use (starting from the first element of the list until it finds an exact case-insensitive match)."}),"\n",(0,r.jsx)(n.p,{children:"Defined Property:\nThe user can specify the exact property to extract.\nThis is the same behavior as Select-Object -ExpandProperty, with less typing (dir | exp length)."}),"\n",(0,r.jsx)(n.p,{children:"Like / Match comparison:\nSpecifying either like or match allows extracting any number of matching properties from each object.\nNote that this is a somewhat more CPU-expensive operation (which shouldn't matter unless with gargantuan numbers of objects)."}),"\n",(0,r.jsx)(n.h2,{id:"examples",children:"EXAMPLES"}),"\n",(0,r.jsx)(n.h3,{id:"example-1",children:"EXAMPLE 1"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"dir | exp\n"})}),"\n",(0,r.jsx)(n.p,{children:"Expands the property whose name is the first on the defaults list ($DefaultExpandedProperties).\nBy default, FullName would be expanded."}),"\n",(0,r.jsx)(n.h3,{id:"example-2",children:"EXAMPLE 2"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"dir | exp length\n"})}),"\n",(0,r.jsx)(n.p,{children:"Expands the length property of all objects returned by dir.\nSimply ignores those that do not have the property (folders)."}),"\n",(0,r.jsx)(n.h3,{id:"example-3",children:"EXAMPLE 3"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"dir | exp name -match\n"})}),"\n",(0,r.jsx)(n.p,{children:'Expands all properties from all objects returned by dir that match the string "name" ("PSChildName", "FullName", "Name", "BaseName" for directories)'}),"\n",(0,r.jsx)(n.h2,{id:"parameters",children:"PARAMETERS"}),"\n",(0,r.jsx)(n.h3,{id:"-name",children:"-Name"}
1),"\n",(0,r.jsx)(n.p,{children:"ParSet: Equals, Like, Match\nThe name of the Property to expand."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"Type: String\nParameter Sets: Equals\nAliases:\n\nRequired: False\nPosition: 1\nDefault value: None\nAccept pipeline input: False\nAccept wildcard characters: False\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"Type: String\nParameter Sets: Match, Like\nAliases:\n\nRequired: True\nPosition: 1\nDefault value: None\nAccept pipeline input: False\nAccept wildcard characters: False\n"})}),"\n",(0,r.jsx)(n.h3,{id:"-like",children:"-Like"}),"\n",(0,r.jsx)(n.p,{children:"ParSet: Like\nExpands all properties that match the -Name parameter using -like comparison."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"Type: SwitchParameter\nParameter Sets: Like\nAliases:\n\nRequired: True\nPosition: Named\nDefault value: False\nAccept pipeline input: False\nAccept wildcard characters: False\n"})}),"\n",(0,r.jsx)(n.h3,{id:"-match",children:"-Match"}),"\n",(0,r.jsx)(n.p,{children:"ParSet: Match\nExpands all properties that match the -Name parameter using -match comparison."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"Type: SwitchParameter\nParameter Sets: Match\nAliases:\n\nRequired: True\nPosition: Named\nDefault value: False\nAccept pipeline input: False\nAccept wildcard characters: False\n"})}),"\n",(0,r.jsx)(n.h3,{id:"-inputobject",children:"-InputObject"}),"\n",(0,r.jsx)(n.p,{children:"The objects whose properties are to be expanded."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:"Type: Object\nParameter Sets: (All)\nAliases:\n\nRequired: False\nPosition: Named\nDefault value: None\nAccept pipeline input: True (ByValue)\nAccept wildcard characters: False\n"})}),"\n",(0,r.jsx)(n.h3,{id:"commonparameters",children:"CommonParameters"}),"\n",(0,r.jsxs)(n.p,{children:["This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see ",(0,r.jsx)(n.a,{href:"http://go.microsoft.com/fwlink/?LinkID=113216",children:"about_CommonParameters"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"inputs",children:"INPUTS"}),"\n",(0,r.jsx)(n.h2,{id:"outputs",children:"OUTPUTS"}),"\n",(0,r.jsx)(n.h2,{id:"notes",children:"NOTES"}),"\n",(0,r.jsx)(n.h2,{id:"related-links",children:"RELATED LINKS"})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.