Manikyam Bavandla [MSFT]

My feedback

  1. 6 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    investigating  ·  6 comments  ·  PowerShell » PowerShell Gallery  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Manikyam Bavandla [MSFT] commented  · 

    @Speedbird186: Please follow the instructions provided at below URL to install the latest version of PowerShellGet module.
    https://github.com/PowerShell/PowerShellGet#get-the-latest-version-from-powershell-gallery

    An error occurred while saving the comment
    Manikyam Bavandla [MSFT] commented  · 

    The fix will be available in WMF 5.1 Preview and also in the next release of Windows Server 2016.

    Workaround:
    Use a local repository path without any spaces.

    If you would like to update the PowerShellGet module on your machine, use the below line
    Microsoft.PowerShell.Management\Start-Process -FilePath "$script:NuGetExePath" `
    -ArgumentList @('push', "`"$NupkgPath`"", '-source', "`"$($Destination.TrimEnd('\'))`"", '-NonInteractive', '-ApiKey', "`"$NugetApiKey`"") `
    -RedirectStandardError $tempErrorFile `
    -RedirectStandardOutput $tempOutputFile `
    -NoNewWindow `
    -Wait

  2. 1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  PowerShell » PowerShell Engine  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Manikyam Bavandla [MSFT] commented  · 

    Hi Roman,

    In PS 5.1 or newer, $PSEdition global variable is allowed in the module manifest file. Using this variable, module author can specify the conditional values in the module manifest file.

    Like below:

    Key = if($PSEdition -eq 'Desktop') {
    #---
    }
    else {
    # ---
    };

  3. 2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    investigating  ·  3 comments  ·  PowerShell » Package Management  ·  Flag idea as inappropriate…  ·  Admin →
    An error occurred while saving the comment
    Manikyam Bavandla [MSFT] commented  · 

    Hello,

    You should use #Requires -Module <> to specify the module dependencies.

    For example:
    #Requires -Module @{ModuleName = 'foo'; GUID = '1234565-2784-48bf-af15-70ba837a64d0'; ModuleVersion = '3.5'; }

    Take a look at the https://www.powershellgallery.com/packages/Connect-AzureVM/1.0/Content/Connect-AzureVM.ps1

    Consider using New-ScriptFileInfo cmdlet to create a script file with the script metadata.
    New-ScriptFileInfo cmdlet --> https://technet.microsoft.com/en-us/library/mt653995.aspx

Feedback and Knowledge Base