Cmdlet
Get-OfficeExcelDocumentProperty
Gets built-in, application and custom document properties.
Syntax
Get-OfficeExcelDocumentProperty
[-Document <ExcelDocument>]
[-Kind <BuiltIn| Application| Custom>]
[-Name <String[]>]
[<CommonParameters>]#Parameter set:
DocumentGet-OfficeExcelDocumentProperty
[-Kind <BuiltIn| Application| Custom>]
[-Name <String[]>]
[-Path] <String[]>
[<CommonParameters>]#Parameter set:
PathGet-OfficeExcelDocumentProperty
[-Kind <BuiltIn| Application| Custom>]
-LiteralPath <String[]>
[-Name <String[]>]
[<CommonParameters>]#Parameter set:
LiteralPathExamples
Show document properties
Get-OfficeExcelDocumentProperty -Path .\Reports\Q3-Sales.xlsxLists the built-in, application and custom properties of a workbook.
Report owners of shared workbooks
Get-ChildItem -Path \\files\Reports -Filter *.xlsx |
Get-OfficeExcelDocumentProperty -Name Owner, Classification -Kind Custom |
Format-TableReads the custom Owner and Classification properties of every workbook on the share.
Parameters
- -Document ExcelDocument
- Caller-owned workbook; omission uses the enclosing Excel content block.
- -Kind ExcelDocumentPropertyKind[]
- Metadata kind to add.
- Possible values:
BuiltIn,Application,Custom - -Name String[]
- Property name filter (wildcards supported).
- -Path String[]
- Workbook paths resolved with filesystem wildcard support.
- -LiteralPath String[]
- Literal workbook paths, including FileInfo.FullName and provider PSPath.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.