Skip to content

Autorest.Powershell demo for the French PowerShell User Group

License

Notifications You must be signed in to change notification settings

omiossec/autorest-powershell-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PowerShell Lightning demos

Autorest.PowerShell

Olivier Miossec (@omiossec_med)

Generate a PowerShell module from OpenAPI Specification File with Autorest and Autorest.PowerShell

We will use the Near Earth Object API from CNEOS-JPL

The Api is located at this URI https://api.nasa.gov/neo/?api_key=DEMO_KEY

Demo

Run Autorest with powershell

autorest --powershell --input-file=neo\jpl-neo.yml --output-folder=module --namespace=frpsug

Add functions and costum c# files

copy-item -Path .\module.cs -Destination .\module\custom\module.cs copy-item -Path .\find-armagedon.ps1 -Destination .\module\custom\find-armagedon.ps1

Compile and run the module

.\module\build-module.ps1 -Run

get-module

get-command -module jplneo

get-help

Invoke-CurrentNeoStatistics

(Invoke-BrowseNeoObject -Page 0 -Size 2).NearEarthObjects

find-armagedon

About

Autorest.Powershell demo for the French PowerShell User Group

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published