update-powershellModule.ps1

function update-PowerShellModule
{
     [cmdletbinding()]

    Param
    (
        [Parameter(Mandatory = $true)]
        [string]$powershellModuleName
    )

    out-logfile -string "Entering update-PowerShellModule"

    try
    {
        $modules = get-InstalledModule -name $powershellModuleName -erroraction stop
    }
    catch
    {
        out-logfile -string "Unable to obtain the installed module information."
        out-logfile -string $_ -isError:$TRUE
    }

    try
    {
        update-module -name $modules -force -confirm:$FALSE -erroraction stop
    }
    catch
    {
        out-logfile -string "Unable to update the installed module."
        out-logfile -string $_ -isError:$TRUE
    }
}