Get-PSScriptFileInfo
Returns the metadata for a script.
Syntax
Get-PSScriptFileInfo
[-Path] <String>
[<CommonParameters>]
Description
This cmdlet searches for a PowerShell script located on the machine and returns the script metadata information.
Examples
Example 1
This example returns the metadata for the script MyScript.ps1
.
Get-PSScriptFileInfo -Path '.\Scripts\MyScript.ps1'
Name Version Author Description
---- ------- ------ -----------
MyScript 1.0.0.0 dev@microsoft.com This script is a test script for PowerShellGet…
Parameters
-Path
Specifies the path to the resource.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
Microsoft.PowerShell.PSResourceGet.UtilClasses.PSScriptFileInfo
Notes
The New-PSScriptFileInfo
and Update-PSScriptFileInfo
cmdlets place the #requires
statements
for required modules between the <#PSScriptInfo
and comment-based help blocks of the help file.
The Get-PSScriptFileInfo
expects #requires
statements to be placed somewhere before the
comment-based help block. Any #requires
statements placed after the comment-based help block are
ignored by Get-PSScriptFileInfo
and Publish-PSResource
.
Related Links
PSResourceGet