Private/New.txt

<#
.SYNOPSIS
    Creates a new |short| in netbox
.DESCRIPTION
    This should handle mapping a simple hashtable of values and looking up any references.
.EXAMPLE
    $lookup = @{
        device_type='dcim/device-types'
        device_role='dcim/device-roles'
        site='organization/sites'
        status='dcim/_choices'
    }
    $|short| = @{
        name = 'example'
        serial = 'aka123457'
        device_type = 'dl380-g9'
        device_role = 'oracle'
        site = 'chicago'
        status = 'active'
    }
    New-nb|short| -lookup $lookup -object $|short|
#>
Function New-nb|short| {
    Param (
        # |short| to create
        [Parameter(Mandatory = $true)]
        $Object,

        # List of custom properties
        [Parameter()]
        [string[]]
        $CustomProperties,

        #List of properties to lookup
        [parameter()]
        [hashtable]
        $Lookup
    )
    $forward = @{
        Object=$Object
        CustomProperties=$CustomProperties
        Lookup=$lookup
    }
    New-nbObject -Resource '|long|' @forward
}