< Back

Set-GitHubConfiguration

Sat Jan 18, 2020 9:40 pm

NAME Set-GitHubConfiguration



SYNOPSIS

Change the value of a configuration property for the PowerShellForGitHub module,

for the sesion only, or globally for this user.





SYNTAX

Set-GitHubConfiguration [[-ApiHostName] <String>] [[-ApplicationInsightsKey] <String>] [[-AssemblyPath] <String>]

[-DefaultNoStatus] [[-DefaultOwnerName] <String>] [[-DefaultRepositoryName] <String>] [-DisableLogging]

[-DisablePiiProtection] [-DisableSmarterObjects] [-DisableTelemetry] [[-LogPath] <String>] [-LogProcessId]

[-LogRequestBody] [-LogTimeAsUtc] [[-RetryDelaySeconds] <Int32>] [-SuppressNoTokenWarning]

[-SuppressTelemetryReminder] [[-WebRequestTimeoutSec] <Int32>] [-SessionOnly] [-WhatIf] [-Confirm]

[<CommonParameters>]





DESCRIPTION

Change the value of a configuration property for the PowerShellForGitHub module,

for the sesion only, or globally for this user.



A single call to this method can set any number or combination of properties.



To change any of the boolean/switch properties to false, specify the switch,

immediately followed by ":$false" with no space.



The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub





PARAMETERS

-ApiHostName <String>

The hostname of the GitHub instance to communicate with. Defaults to 'github.com'. Provide a

different hostname when using a GitHub Enterprise server. Do not include the HTTP/S prefix,

and do not include 'api'. For example, use "github.contoso.com".



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ApplicationInsightsKey <String>

Change the Application Insights instance that telemetry will be reported to (if telemetry

hasn't been disabled via DisableTelemetry).



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-AssemblyPath <String>

The location that any dependent assemblies that this module depends on can be located.

If the assemblies can't be found at this location, nor in a temporary cache or in

the module's directory, the assemblies will be downloaded and temporarily cached.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DefaultNoStatus [<SwitchParameter>]

Control if the -NoStatus switch should be passed-in by default to all methods.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DefaultOwnerName <String>

The owner name that should be used with a command that takes OwnerName as a parameter

when no value has been supplied.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DefaultRepositoryName <String>

The owner name that should be used with a command that takes RepositoryName as a parameter

when no value has been supplied.



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DisableLogging [<SwitchParameter>]

Specify this switch to stop the module from logging all activity to a log file located

at the location specified by LogPath.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DisablePiiProtection [<SwitchParameter>]

Specify this switch to disable the hashing of potential PII data prior to submitting the

data to telemetry (if telemetry hasn't been disabled via DisableTelemetry).



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DisableSmarterObjects [<SwitchParameter>]

By deffault, this module will modify all objects returned by the API calls to update

any properties that can be converted to objects (like strings for Date/Time's being

converted to real DateTime objects). Enable this property if you desire getting back

the unmodified version of the object from the API.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DisableTelemetry [<SwitchParameter>]

Specify this switch to stop the module from reporting any of its usage (which would be used

for diagnostics purposes).



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-LogPath <String>

The location of the log file that all activity will be written to if DisableLogging remains

$false.



Required? false

Position? 6

Default value

Accept pipeline input? false

Accept wildcard characters? false



-LogProcessId [<SwitchParameter>]

If specified, the Process ID of the current PowerShell session will be included in each

log entry. This can be useful if you have concurrent PowerShell sessions all logging

to the same file, as it would then be possible to filter results based on ProcessId.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-LogRequestBody [<SwitchParameter>]

If specified, the JSON body of the REST request will be logged to verbose output.

This can be helpful for debugging purposes.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-LogTimeAsUtc [<SwitchParameter>]

If specified, all times logged will be logged as UTC instead of the local timezone.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-RetryDelaySeconds <Int32>

The number of seconds to wait before retrying a command again after receiving a 202 response.



Required? false

Position? 7

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-SuppressNoTokenWarning [<SwitchParameter>]

If an Access Token has not been configured, this module will provide a warning to the user

informing them of this, once per session. If it is expected that this module will regularly

be used without configuring an Access Token, specify this switch to always suppress that

warning message.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-SuppressTelemetryReminder [<SwitchParameter>]

When telemetry is enabled, a warning will be printed to the console once per session

informing users that telemetry is occurring. Setting this value will suppress that

message from showing up ever again.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WebRequestTimeoutSec <Int32>

The number of seconds that should be allowed before an API request times out. A value of

0 indicates an infinite timeout, however experience has shown that PowerShell doesn't seem

to always honor inifinite timeouts. Hence, this value can be configured if need be.



Required? false

Position? 8

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-SessionOnly [<SwitchParameter>]

By default, this method will store the configuration values in a local file so that changes

persist across PowerShell sessions. If this switch is provided, the file will not be

created/updated and the specified configuration changes will only remain in memory/effect

for the duration of this PowerShell session.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Set-GitHubConfiguration -WebRequestTimeoutSec 120 -SuppressNoTokenWarning



Changes the timeout permitted for a web request to two minutes, and additionally tells

the module to never warn about no Access Token being configured. These settings will be

persisted across future PowerShell sessions.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Set-GitHubConfiguration -DisableLogging -SessionOnly



Disables the logging of any activity to the logfile specified in LogPath, but for this

session only.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Set-GitHubConfiguration -ApiHostName "github.contoso.com"



Sets all requests to connect to a GitHub Enterprise server running at

github.contoso.com.











RELATED LINKS