Public/Update-NuGet.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function Update-NuGet
{
    <#
        .SYNOPSIS
            Updates NuGet.exe.
        .DESCRIPTION
            Updates NuGet.exe.
        .PARAMETER Force
            A switch specifying whether or not to force the install if already installed.
        .EXAMPLE
            Update-NuGet
 
            Description
            -----------
            This example will install the last version of NuGet.exe.
        .NOTES
    #>

    [CmdLetBinding()]
    param()
    
    try 
    {
        Install-NuGet -Force
    }
    catch
    {
        Write-Error $_
    }
}