API Reference
Cmdlet
Get-OfficeWordDocumentProperty
Gets built-in and custom document properties from a Word document.
Remarks
Gets built-in and custom document properties from a Word document.
Examples
Example 1: Read release metadata from a document.
PS>
$properties = Get-OfficeWordDocumentProperty -Path .\Report.docx -Name Title, Subject, ReleaseStatus
$properties |
Select-Object -Property Name, Value, IsCustom |
Format-Table -AutoSize
Returns selected built-in and custom properties for a document metadata check.
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.
Syntax
Get-OfficeWordDocumentProperty [-BuiltIn] [-Custom] -InputPath <String> [-Name <String[]>] [<CommonParameters>]#Parameter set:
PathParameters
- BuiltIn SwitchParameter
- Only return built-in document properties.
- Custom SwitchParameter
- Only return custom document properties.
- InputPath String
- Path to the document.
- Name String[]
- Property name filter (wildcards supported).
Outputs
PSWriteOffice.Models.Word.WordDocumentPropertyInfo: Represents a Word document property exposed to PowerShell.
Get-OfficeWordDocumentProperty [-BuiltIn] [-Custom] -Document <WordDocument> [-Name <String[]>] [<CommonParameters>]#Parameter set:
DocumentParameters
- BuiltIn SwitchParameter
- Only return built-in document properties.
- Custom SwitchParameter
- Only return custom document properties.
- Document WordDocument
- Document to inspect.
- Name String[]
- Property name filter (wildcards supported).
Outputs
PSWriteOffice.Models.Word.WordDocumentPropertyInfo: Represents a Word document property exposed to PowerShell.