PowerShell Module: Advanced Guide

Note

This feature is only available in the Nerdio ManagerPremium edition.

The PowerShell Module for Nerdio Manager is a wrapper for the Nerdio Manager REST API. Certain “advanced” cmdlets require a JSON object to be passed as a parameter. This document explains one possible way to generate such JSON objects.

Note

The PowerShell Module for Nerdio Manager is in public preview. Please submit your feedback here.

Prerequisites

Install the PowerShell module. See PowerShell Module: Tutorial for details.

Create the Object

The following steps must be performed to create the object.

To create the object:
  1. Identify which cmdlet is required to complete the task (for example, New-NmeAppAttachImage).

  2. Run the Get-Help cmdlet:

    Get-Help New-NmeAppAttachImage -full
    image1463.png

    Note

    In this example, the cmdlet New-NmeAppAttachImage takes an object. The object itself is internal to Nerdio and can be generated via New-NmeAppAttachImageRestPostRequest.

  3. Run the command below to see the properties and to see the syntax for creating the object.

    Get-Help New-NmeAppAttachImageRestPostRequest -full
    image1464.png
  4. Select one of the following options to get the values:

    • In the Nerdio Manager portal (for example, https://nmw-app-i55ow6qnxy6hc6-new.azurewebsites.net/app-attach/images)

    • Run the corresponding Get* cmdlet. (for example, Get -NmeAppAttachImage)

      image1465.png
    • Create the payload object using the cmdlet and providing the values from the previous steps.

      $requestPayload = New-NmeAppAttachImageRestPostRequest 
      -locationId 19bccd18-cbec-4c61-f71c-71db34322vc50f 
      -imageName "test-image" 
      -description "test-image from PS"
  5. Create a new image by passing the payload request.

    New-NmeAppAttachImage -NmeAppAttachImageRestPostRequest $requestPayload
    image1468.png
  6. Run Get-NmeAppAttachImage to confirm the outcome.

    image1467.png

Was this article helpful?

1 out of 1 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Please sign in to leave a comment.