Save-Gist


Synopsis

Save a Gist Object to the local machine.


Syntax

Save-Gist [[-Path] <string>] [-Id] <string[]>  [<CommonParameters>]

Aliases

None.


Description

Saves the GistFile contents of a Gist to the local disk using the currently authenticated user context.


Parameters

-Id <string[]>
    The Id of the Gist Object.
    
    Required?                    true
    Position?                    Named
    Accept pipeline input?       true (ByValue, ByPropertyName)
    Parameter set name           (All)
    Aliases                      None
    Dynamic?                     false
    
-Path <string>
    Path to save the Gist Object.
    
    Required?                    false
    Position?                    Named
    Accept pipeline input?       false
    Parameter set name           (All)
    Aliases                      None
    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). 

Inputs

System.String[]

  • Represents text as a sequence of UTF-16 code units.

Outputs

System.IO.FileInfo

  • Provides properties and instance methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of FileStream objects. This class cannot be inherited.

Notes

There must be an Authenticated User Context to interact with Gist Objects. If a path is not supplied, the default directory is $env:AppData\PSGist. —

Example 1

PS C:\> Save-Gist -Id a5b60bdf7955e029a500


    Directory: C:\Users\dotps1\AppData\Roaming\PSGist\a5b60bdf7955e029a500


Mode                LastWriteTime         Length Name                                                                                                                                                                                                                                     
----                -------------         ------ ----                                                                                                                                                                                                                                     
-a----        6/20/2016   2:46 PM           1163 ProtectedAttributeCleanup.ps1      
Fork me on GitHub