< Back

Install-ModuleGit

Wed Jan 15, 2020 4:06 am

NAME Install-ModuleGit



SYNOPSIS

Installs a powershell module from a git repo





SYNTAX

Install-ModuleGit [-GitHubRepo <Object>] [-Branch <Object>] [-ProjectUri <Object>] [-Scope <String>]

[<CommonParameters>]





DESCRIPTION

Will download a zip of a repo, then try to install it correctly to a location dependant on the position/presence

of .psd1 files





PARAMETERS

-GitHubRepo <Object>



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Branch <Object>



Required? false

Position? named

Default value master

Accept pipeline input? false

Accept wildcard characters? false



-ProjectUri <Object>



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Scope <String>

The scope of module installation



Required? false

Position? named

Default value AllUsers

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

None.





NOTES





This function will default to trying to install to the admin's powershell, so if run as a normal user, the

appropriate directory will need to be specified.



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



PS C:\\>This will install a powershell yaml module to the normal/non-admin user's powershell module directory.



Install-ModuleGit -GitHubRepo Phil-Factor/PSYaml -DestinationPath

C:\\Users\\vagrant\\Documents\\WindowsPowerShell\\Modules











RELATED LINKS