Create a New Gist Object.
New-Gist -Path <string[]> [-Description <string>] [-Public] [-WhatIf] [-Confirm] [<CommonParameters>]
New-Gist [-Description <string>] [-Public] [-WhatIf] [-Confirm] [-IseScriptPane] [-FileName <string>] [<CommonParameters>]
None.
Creates a new Gist Object using the currently authenticated user context.
-Confirm
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases cf
Dynamic? false
-Description <string>
Description of the Gist Object.
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
-FileName <string>
The name of the Gist file.
Required? false
Position? Named
Accept pipeline input? false
Parameter set name IseScriptPane
Aliases None
Dynamic? true
-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
-Public
Allows the Gist Object to be viewed by others.
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
-WhatIf
Required? false
Position? Named
Accept pipeline input? false
Parameter set name (All)
Aliases wi
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.
Creates a new Gist and adds the file ProtectedAttributeCleanup.ps1 to it.
PS C:\> New-Gist -Path .\ProtectedAttributeCleanup.ps1 -Public
Owner : dotps1
Description : Find users in a domain that have the protected attribute that should not, remove that attribute and re enable inheritance.
Id : a5b60bdf7955e029a500
CreatedAt : 2/3/2016 3:20:37 PM
UpdatedAt : 2/4/2016 11:59:19 AM
Public : True
HtmlUrl : https://gist.github.com/a5b60bdf7955e029a500
Files : ProtectedAttributeCleanup.ps1
Creates a new Gist Object and uses the content from the currently active ISE Script Pane Tab as the contents.
PS C:\> New-Gist -IseScriptPane -FileName ProtectedAttributeCleanup.ps1 -Public
Owner : dotps1
Description : Find users in a domain that have the protected attribute that should not, remove that attribute and re enable inheritance.
Id : a5b60bdf7955e029a500
CreatedAt : 2/3/2016 3:20:37 PM
UpdatedAt : 2/4/2016 11:59:19 AM
Public : True
HtmlUrl : https://gist.github.com/a5b60bdf7955e029a500
Files : ProtectedAttributeCleanup.ps1