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.
Install the PowerShell module. See PowerShell Module: Tutorial for details.
The following steps must be performed to create the object.
To create the object:
-
Identify which cmdlet is required to complete the task (for example, New-NmeAppAttachImage).
-
Run the Get-Help cmdlet:
Get-Help New-NmeAppAttachImage -full
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.
-
Run the command below to see the properties and to see the syntax for creating the object.
Get-Help New-NmeAppAttachImageRestPostRequest -full
-
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)
-
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"
-
-
Create a new image by passing the payload request.
New-NmeAppAttachImage -NmeAppAttachImageRestPostRequest $requestPayload
-
Run
Get-NmeAppAttachImageto confirm the outcome.
Comments (0 comments)