Add a file to an existing Gist Object.
Add-GistFile -Id <string> -Path <string[]> [<CommonParameters>]
Add-GistFile -Id <string> [-IseScriptPane] [-FileName <string>] [<CommonParameters>]
None.
Add one or more files to an existing Gist Object using the currently authenticated user context.
-FileName <string>
The name of the GistFile.
Required? false
Position? Named
Accept pipeline input? false
Parameter set name IseScriptPane
Aliases None
Dynamic? true
-Id <string>
The Id of the Gist Object.
Required? true
Position? Named
Accept pipeline input? true (ByPropertyName)
Parameter set name (All)
Aliases None
Dynamic? false
-IseScriptPane
Captures the current active ISE Script Pane for the GistFile content.
Required? false
Position? Named
Accept pipeline input? false
Parameter set name IseScriptPane
Aliases None
Dynamic? true
-Path <string[]>
Path to file(s) where the content will be used for the GistFile.
Required? true
Position? Named
Accept pipeline input? true (ByPropertyName)
Parameter set name Path
Aliases FullName
Dynamic? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
There must be an Authenticated User Context to interact with Gist Objects. The IseScriptPane Parameter Set is only available from within the PowerShell_Ise Application.
Add the file ‘AddGistFile.ps1’ to the Gist ‘93258652fee1551dd0c63fbd5a37c8e0’.
PS C:\> Add-GistFile -Id 93258652fee1551dd0c63fbd5a37c8e0 -Path .\AddGistFile.ps1
Owner : dotps1
Description : Read me file for PSGist.
Id : 93258652fee1551dd0c63fbd5a37c8e0
CreatedAt : 1/1/2016 00:00:00 AM
UpdatedAt : 1/1/2016 00:00:00 AM
Public : True
HtmlUrl : https://gist.github.com/93258652fee1551dd0c63fbd5a37c8e0
Files : {AddGistFile.ps1, README.md}
Add the content from the current ISE Script Pane and create a new file called ‘IseScriptPaneContent.ps1’ and add the file to the Gist ‘93258652fee1551dd0c63fbd5a37c8e0’.
PS C:\> Add-GistFile -Id 93258652fee1551dd0c63fbd5a37c8e0 -IseScriptPane -FileName IseScriptPaneContent.ps1
Owner : dotps1
Description : Read me file for PSGist.
Id : 93258652fee1551dd0c63fbd5a37c8e0
CreatedAt : 1/1/2016 00:00:00 AM
UpdatedAt : 1/1/2016 00:00:00 AM
Public : True
HtmlUrl : https://gist.github.com/93258652fee1551dd0c63fbd5a37c8e0
Files : {IseScriptPaneContent.ps1, README.md}