diff --git a/.vscode/launch.json b/.vscode/launch.json index 8f51e52..247e672 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,6 +1,17 @@ { "version": "0.2.0", +<<<<<<< HEAD "configurations": [{ +======= + "configurations": [ + { + "type": "PowerShell", + "request": "launch", + "name": "PowerShell Interactive Session", + "cwd": "${workspaceRoot}" + }, + { +>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f "type": "PowerShell", "request": "launch", "name": "PowerShell Pester Tests", @@ -15,6 +26,7 @@ "script": "${file}", "args": [], "cwd": "${file}" +<<<<<<< HEAD }, { "type": "PowerShell", @@ -31,3 +43,8 @@ } ] } +======= + } + ] +} +>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dc4d10..7877f1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +<<<<<<< HEAD # Change Log All notable changes to this project will be documented in this file. @@ -6,3 +7,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/), and this project adheres to [Semantic Versioning](http://semver.org/). ## [1.0] - 2017-11-18 +======= +[1.0] +>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2894d0f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Brian Bunke + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..b365a91 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +[![Build status](https://ci.appveyor.com/api/projects/status/dvuw4ggx543nx3h7?svg=true)](https://ci.appveyor.com/project/snazy2000/snipeitps) \ No newline at end of file diff --git a/SnipeItPS.build.ps1 b/SnipeItPS.build.ps1 index ee9bb33..dbaf8d9 100644 --- a/SnipeItPS.build.ps1 +++ b/SnipeItPS.build.ps1 @@ -99,7 +99,11 @@ task TestPS5 { } # Synopsis: Invoke Pester Tests +<<<<<<< HEAD task PesterTests, { +======= +task PesterTests CreateHelp, { +>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f try { $result = Invoke-Pester -PassThru -OutputFile "$BuildRoot\TestResult.xml" -OutputFormat "NUnitXml" if ($env:APPVEYOR_PROJECT_NAME) { @@ -118,9 +122,20 @@ task PesterTests, { # Synopsis: Build shippable release task Build GenerateRelease, ConvertMarkdown, UpdateManifest +<<<<<<< HEAD # Synopsis: Generate .\Release structure task GenerateRelease, { +======= +task CreateHelp { + Import-Module platyPS -Force + New-ExternalHelp -Path "$BuildRoot\docs" -OutputPath "$BuildRoot\SnipeitPS\en-US" -Force + Remove-Module SnipeitPS, platyPS +} + +# Synopsis: Generate .\Release structure +task GenerateRelease CreateHelp, { +>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f # Setup if (-not (Test-Path "$releasePath\SnipeitPS")) { $null = New-Item -Path "$releasePath\SnipeitPS" -ItemType Directory @@ -140,7 +155,10 @@ task GenerateRelease, { # Synopsis: Update the manifest of the module task UpdateManifest GetVersion, { Update-Metadata -Path "$releasePath\SnipeitPS\SnipeitPS.psd1" -PropertyName ModuleVersion -Value $script:Version +<<<<<<< HEAD # Update-Metadata -Path "$releasePath\SnipeitPS\SnipeitPS.psd1" -PropertyName FileList -Value (Get-ChildItem $releasePath\SnipeitPS -Recurse).Name +======= +>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f $functionsToExport = Get-ChildItem "$BuildRoot\SnipeitPS\Public" | ForEach-Object {$_.BaseName} Set-ModuleFunctions -Name "$releasePath\SnipeitPS\SnipeitPS.psd1" -FunctionsToExport $functionsToExport } @@ -163,8 +181,58 @@ task GetVersion { $newRevision } +<<<<<<< HEAD +======= +# Synopsis: Convert markdown files to HTML. +# +$ConvertMarkdown = @{ + Inputs = { Get-ChildItem "$releasePath\SnipeitPS\*.md" -Recurse } + Outputs = {process { + [System.IO.Path]::ChangeExtension($_, 'htm') + } + } +} +# Synopsis: Converts *.md and *.markdown files to *.htm +task ConvertMarkdown -Partial @ConvertMarkdown InstallPandoc, {process { + exec { Tools\pandoc.exe $_ --standalone --from=markdown_github "--output=$2" } + } +}, RemoveMarkdownFiles +>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f # endregion +# region publish +task Deploy -If ( + # Only deploy if the master branch changes + $env:APPVEYOR_REPO_BRANCH -eq 'master' -and + # Do not deploy if this is a pull request (because it hasn't been approved yet) + (-not ($env:APPVEYOR_PULL_REQUEST_NUMBER)) -and + # Do not deploy if the commit contains the string "skip-deploy" + # Meant for major/minor version publishes with a .0 build/patch version (like 2.1.0) + $env:APPVEYOR_REPO_COMMIT_MESSAGE -notlike '*skip-deploy*' +) { + Remove-Module SnipeitPS -ErrorAction SilentlyContinue +}, PublishToGallery + +task PublishToGallery { + assert ($env:PSGalleryAPIKey) "No key for the PSGallery" + + Import-Module $releasePath\SnipeitPS\SnipeitPS.psd1 -ErrorAction Stop + Publish-Module -Name SnipeitPS -NuGetApiKey $env:PSGalleryAPIKey +} + +# Synopsis: Push with a version tag. +task PushRelease GitStatus, GetVersion, { + # Done in appveyor.yml with deploy provider. + # This is needed, as I don't know how to athenticate (2-factor) in here. + exec { git checkout master } + $changes = exec { git status --short } + assert (!$changes) "Please, commit changes." + + exec { git push } + exec { git tag -a "v$Version" -m "v$Version" } + exec { git push origin "v$Version" } +} +# endregion #region Cleaning tasks @@ -176,10 +244,20 @@ task RemoveGeneratedFiles { 'Release' '*.htm' 'TestResult.xml' + 'SnipeitPS\en-US\*' ) Remove-Item $itemsToRemove -Force -Recurse -ErrorAction 0 } +<<<<<<< HEAD # endregion task . ShowDebug, Clean, Test, Build, Deploy +======= +task RemoveMarkdownFiles { + Remove-Item "$releasePath\SnipeitPS\*.md" -Force -ErrorAction 0 +} +# endregion + +task . ShowDebug, Clean, Test, Build, Deploy +>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f diff --git a/SnipeitPS/Private/ConvertTo-GetParameter.ps1 b/SnipeitPS/Private/ConvertTo-GetParameter.ps1 new file mode 100644 index 0000000..e0f31c9 --- /dev/null +++ b/SnipeitPS/Private/ConvertTo-GetParameter.ps1 @@ -0,0 +1,26 @@ +function ConvertTo-GetParameter { + <# + .SYNOPSIS + Generate the GET parameter string for an URL from a hashtable + #> + [CmdletBinding()] + param ( + [Parameter( Position = 0, Mandatory = $true, ValueFromPipeline = $true )] + [hashtable]$InputObject + ) + + BEGIN { + [string]$parameters = "?" + } + + PROCESS { + Write-Verbose "[$($MyInvocation.MyCommand.Name)] Making HTTP get parameter string out of a hashtable" + foreach ($key in $InputObject.Keys) { + $parameters += "$key=$($InputObject[$key])&" + } + } + + END { + $parameters -replace ".$" + } +} \ No newline at end of file diff --git a/SnipeitPS/Private/Invoke-Method.psm1 b/SnipeitPS/Private/Invoke-Method.psm1 index ab49489..a5188a4 100644 --- a/SnipeitPS/Private/Invoke-Method.psm1 +++ b/SnipeitPS/Private/Invoke-Method.psm1 @@ -19,7 +19,11 @@ [ValidateNotNullOrEmpty()] [string]$Body, - [string] $Token + [string] $Token, + + # GET Parameters + [Hashtable]$GetParameters + ) BEGIN { @@ -38,6 +42,14 @@ } Process { + if ($GetParameters -and ($URi -notlike "*\?*")) + { + Write-Debug "Using `$GetParameters: $($GetParameters | Out-String)" + [string]$URI += (ConvertTo-GetParameter $GetParameters) + # Prevent recursive appends + $GetParameters = $null + } + # set mandatory parameters $splatParameters = @{ Uri = $URi diff --git a/SnipeitPS/Public/Assets.psm1 b/SnipeitPS/Public/Assets.psm1 index c019f71..e8d0e75 100644 --- a/SnipeitPS/Public/Assets.psm1 +++ b/SnipeitPS/Public/Assets.psm1 @@ -35,6 +35,11 @@ function Get-Asset() function New-Asset() { + [CmdletBinding( + SupportsShouldProcess=$true, + ConfirmImpact="High" + )] + Param( [parameter(mandatory=$true)] [string]$Name, @@ -64,16 +69,27 @@ function New-Asset() $Body = $Values | ConvertTo-Json; - $result = Invoke-Method -URi "$url/api/v1/hardware" ` - -Method POST ` - -Body $Body ` - -Token $apiKey + $Parameters = @{ + Uri = "$url/api/v1/hardware" + Method = 'Post' + Body = $Body + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess()) { + $result = Invoke-Method @Parameters + } $result } function Set-Asset() { + [CmdletBinding( + SupportsShouldProcess=$true, + ConfirmImpact="High" + )] + Param( [parameter(mandatory=$true)] [int]$id, @@ -105,16 +121,27 @@ function Set-Asset() $Values += $customfields $Body = $Values | ConvertTo-Json; - $result = Invoke-Method -URi "$url/api/v1/hardware/$id" ` - -Method PUT ` - -Body $Body ` - -Token $apiKey + $Parameters = @{ + Uri = "$url/api/v1/hardware/$id" + Method = 'Put' + Body = $Body + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess()) { + $result = Invoke-Method @Parameters + } $result } function Set-AssetOwner() { + [CmdletBinding( + SupportsShouldProcess=$true, + ConfirmImpact="High" + )] + Param( [parameter(mandatory=$true)] [int]$id, @@ -135,10 +162,16 @@ function Set-AssetOwner() $Body = $Values | ConvertTo-Json; - $result = Invoke-Method -Uri "$url/api/v1/hardware/$id/checkout" ` - -Method POST ` - -Token $apiKey ` - -Body $Body + $Parameters = @{ + Uri = "$url/api/v1/hardware/$id/checkout" + Method = 'POST' + Body = $Body + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess()) { + $result = Invoke-Method @Parameters + } return $result } diff --git a/SnipeitPS/Public/Categories.psm1 b/SnipeitPS/Public/Categories.psm1 index c93ce35..c80cb3d 100644 --- a/SnipeitPS/Public/Categories.psm1 +++ b/SnipeitPS/Public/Categories.psm1 @@ -1,4 +1,4 @@ -function Get-Categories() +function Get-Category() { Param( [parameter(mandatory=$true)] diff --git a/SnipeitPS/Public/Components.psm1 b/SnipeitPS/Public/Components.psm1 index 64cc7cb..28fe70f 100644 --- a/SnipeitPS/Public/Components.psm1 +++ b/SnipeitPS/Public/Components.psm1 @@ -17,6 +17,11 @@ function Get-Component() function New-Component() { + [CmdletBinding( + SupportsShouldProcess=$true, + ConfirmImpact="High" + )] + Param( [parameter(mandatory=$true)] [string]$name, @@ -42,16 +47,27 @@ function New-Component() $Body = $Values | ConvertTo-Json; - $result = Invoke-Method -URi "$url/api/v1/components" ` - -Method POST ` - -Body $Body ` - -Token $apiKey + $Parameters = @{ + Uri = "$url/api/v1/components" + Method = 'POST' + Body = $Body + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess()) { + $result = Invoke-Method @Parameters + } $result } -function Update-Component() +function Set-Component() { + [CmdletBinding( + SupportsShouldProcess=$true, + ConfirmImpact="High" + )] + Param( [parameter(mandatory=$true)] [string]$id, @@ -72,10 +88,16 @@ function Update-Component() $Body = $Values | ConvertTo-Json; - $result = Invoke-Method -URi "$url/api/v1/components/$component_id" ` - -Method Patch ` - -Body $Body ` - -Token $apiKey + $Parameters = @{ + Uri = "$url/api/v1/components/$component_id" + Method = 'Patch' + Body = $Body + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess()) { + $result = Invoke-Method @Parameters + } $result } diff --git a/SnipeitPS/Public/Manufacturers.psm1 b/SnipeitPS/Public/Manufacturers.psm1 index def3ee3..0fa234d 100644 --- a/SnipeitPS/Public/Manufacturers.psm1 +++ b/SnipeitPS/Public/Manufacturers.psm1 @@ -1,4 +1,4 @@ -function Get-Manufacturers() +function Get-Manufacturer() { Param( [parameter(mandatory=$true)] @@ -17,6 +17,11 @@ function Get-Manufacturers() function New-Manufacturer() { + [CmdletBinding( + SupportsShouldProcess=$true, + ConfirmImpact="High" + )] + Param( [parameter(mandatory=$true)] [string]$Name, @@ -36,10 +41,16 @@ function New-Manufacturer() #Convert Values to JSON format $Body = $Values | ConvertTo-Json; - $result = Invoke-Method -URi "$url/api/v1/manufacturers" ` - -Method POST ` - -Body $Body ` - -Token $apiKey + $Parameters = @{ + Uri = "$url/api/v1/manufacturers" + Method = 'post' + Body = $Body + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess()) { + $result = Invoke-Method @Parameters + } $result } diff --git a/SnipeitPS/Public/Models.psm1 b/SnipeitPS/Public/Models.psm1 index 7ceca54..caa093e 100644 --- a/SnipeitPS/Public/Models.psm1 +++ b/SnipeitPS/Public/Models.psm1 @@ -1,5 +1,5 @@ -function Get-Models() +function Get-Model() { Param( [parameter(mandatory=$true)] @@ -19,6 +19,11 @@ function Get-Models() function New-Model() { + [CmdletBinding( + SupportsShouldProcess=$true, + ConfirmImpact="High" + )] + Param( [parameter(mandatory=$true)] [string]$name, @@ -48,10 +53,16 @@ function New-Model() $Body = $Values | ConvertTo-Json; - $result = Invoke-Method -URi "$url/api/v1/models" ` - -Method POST ` - -Body $Body ` - -Token $apiKey + $Parameters = @{ + Uri = "$url/api/v1/models" + Method = 'post' + Body = $Body + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess()) { + $result = Invoke-Method @Parameters + } $result } diff --git a/SnipeitPS/Public/Users.psm1 b/SnipeitPS/Public/Users.psm1 index b11cc85..e1017d3 100644 --- a/SnipeitPS/Public/Users.psm1 +++ b/SnipeitPS/Public/Users.psm1 @@ -15,7 +15,7 @@ Get-Users -url "https://assets.dip.co.uk" -token "token..." Get-Users -url "https://assets.dip.co.uk" -token "token..." | Where-Object {$_.username -eq "stephenm" } #> -function Get-Users() +function Get-User() { Param( [parameter(mandatory=$true)] diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index c4b382c..76d510d 100644 Binary files a/SnipeitPS/SnipeItPS.psd1 and b/SnipeitPS/SnipeItPS.psd1 differ diff --git a/Tests/SnipeItPS.Tests.ps1 b/Tests/SnipeItPS.Tests.ps1 index 2fe046a..cb0c5f1 100644 --- a/Tests/SnipeItPS.Tests.ps1 +++ b/Tests/SnipeItPS.Tests.ps1 @@ -8,7 +8,11 @@ $manifestFile = "$moduleRoot\SnipeitPS.psd1" $changelogFile = "$projectRoot\CHANGELOG.md" $appveyorFile = "$projectRoot\appveyor.yml" $publicFunctions = "$moduleRoot\Public" +<<<<<<< HEAD $privateFunctions = "$moduleRoot\Private" +======= +$internalFunctions = "$moduleRoot\Private" +>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f Describe "SnipeitPS" { Context "All required tests are present" { @@ -27,26 +31,22 @@ Describe "SnipeitPS" { # These tests are...erm, borrowed...from the module tests from the Pester module. # I think they are excellent for sanity checking, and all credit for the following # tests goes to Dave Wyatt, the genius behind Pester. I've just adapted them - # slightly to match ConfluencePS. + # slightly to match SnipeitPS. $script:manifest = $null - foreach ($line in (Get-Content $changelogFile)) - { - if ($line -match "^\D*(?(\d+\.){1,3}\d+)") - { + foreach ($line in (Get-Content $changelogFile)) { + if ($line -match "^\D*(?(\d+\.){1,3}\d+)") { $changelogVersion = $matches.Version break } } - foreach ($line in (Get-Content $appveyorFile)) - { + foreach ($line in (Get-Content $appveyorFile)) { # (?()) - non-capturing group, but named Version. This makes it # easy to reference the inside group later. - if ($line -match '^\D*(?(\d+\.){1,3}\d+).\{build\}') - { + if ($line -match '^\D*(?(\d+\.){1,3}\d+).\{build\}') { $appveyorVersion = $matches.Version break } @@ -103,10 +103,6 @@ Describe "SnipeitPS" { $appveyorVersion | Should Not BeNullOrEmpty $appveyorVersion -as [Version] | Should Not BeNullOrEmpty } - - It "Appveyor version matches manifest version" { - $appveyorVersion -as [Version] | Should Be ( $script:manifest.ModuleVersion -as [Version] ) - } } # The CI changes I'm testng now will render this section obsolete, @@ -134,6 +130,43 @@ Describe "SnipeitPS" { # } # } + # foreach ($f in $internalFiles) { + # It "Does not export $f" { + # $exportedFunctions -contains $f | Should Be $false + # } + # } + # } + + It "Appveyor version matches manifest version" { + $appveyorVersion -as [Version] | Should Be ( $script:manifest.ModuleVersion -as [Version] ) + } + } + + # The CI changes I'm testng now will render this section obsolete, + # as it should automatically patch the module manifest file with all + # exported function names. + # Leaving the code here for the moment while I can ensure those + # features are working correctly. + + # + # Context "Function checking" { + # $functionFiles = Get-ChildItem $publicFunctions -Filter *.ps1 | + # Select-Object -ExpandProperty BaseName | + # Where-Object { $_ -notlike "*.Tests" } + + # $internalFiles = Get-ChildItem $internalFunctions -Filter *.ps1 | + # Select-Object -ExpandProperty BaseName | + # Where-Object { $_ -notlike "*.Tests" } + + # #$exportedFunctions = $script:manifest.ExportedFunctions.Values.Name + # $exportedFunctions = $script:manifest.FunctionsToExport + + # foreach ($f in $functionFiles) { + # It "Exports $f" { + # $exportedFunctions -contains $f | Should Be $true + # } + # } + # foreach ($f in $internalFiles) { # It "Does not export $f" { # $exportedFunctions -contains $f | Should Be $false @@ -153,55 +186,47 @@ Describe "SnipeitPS" { It 'Source files contain no trailing whitespace' { $badLines = @( - foreach ($file in $files) - { + foreach ($file in $files) { $lines = [System.IO.File]::ReadAllLines($file.FullName) $lineCount = $lines.Count - for ($i = 0; $i -lt $lineCount; $i++) - { - if ($lines[$i] -match '\s+$') - { + for ($i = 0; $i -lt $lineCount; $i++) { + if ($lines[$i] -match '\s+$') { 'File: {0}, Line: {1}' -f $file.FullName, ($i + 1) } } } ) - if ($badLines.Count -gt 0) - { + if ($badLines.Count -gt 0) { throw "The following $($badLines.Count) lines contain trailing whitespace: `r`n`r`n$($badLines -join "`r`n")" } } + } It 'Source files all end with a newline' { $badFiles = @( - foreach ($file in $files) - { + foreach ($file in $files) { $string = [System.IO.File]::ReadAllText($file.FullName) - if ($string.Length -gt 0 -and $string[-1] -ne "`n") - { + if ($string.Length -gt 0 -and $string[-1] -ne "`n") { $file.FullName } } ) - if ($badFiles.Count -gt 0) - { + if ($badFiles.Count -gt 0) { throw "The following files do not end with a newline: `r`n`r`n$($badFiles -join "`r`n")" } } } Context 'PSScriptAnalyzer Rules' { - $analysis = Invoke-ScriptAnalyzer -Path "$moduleRoot" -Recurse -Settings "$projectRoot\PSScriptAnalyzerSettings.psd1" + $analysis = Invoke-ScriptAnalyzer -Path "$moduleRoot" -Recurse $scriptAnalyzerRules = Get-ScriptAnalyzerRule - forEach ($rule in $scriptAnalyzerRules) - { + forEach ($rule in $scriptAnalyzerRules) { It "Should pass $rule" { - If (($analysis) -and ($analysis.RuleName -contains $rule)) - { + If (($analysis) -and ($analysis.RuleName -contains $rule)) { $analysis | Where RuleName -EQ $rule -OutVariable failures | Out-Default diff --git a/appveyor.yml b/appveyor.yml index 30792f5..c16c57c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,8 +10,9 @@ # This tells AppVeyor that we need WMF 5 and PowerShell 5.0 os: WMF 5 -#environment: - # To encrypt a value in AppVeyor, go to the Account menu and choose "Encrypt data" +environment: + PSGalleryAPIKey: + secure: UdM6qhf5B0G8liHhUrwWERCZr44iSqmg4jUq0lwlTjZs4KyeoiwnBzdej0phqIAm version: 1.0.{build} @@ -41,6 +42,7 @@ install: Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | Out-Null Install-Module InvokeBuild -Scope CurrentUser -Force Install-Module BuildHelpers -Scope CurrentUser -Force + Install-Module platyPS -Scope CurrentUser -Force Install-Module Pester -Scope CurrentUser -Force Install-Module PSScriptAnalyzer -Scope CurrentUser -Force $env:releasePath = "$($pwd.Path)\Release" @@ -57,3 +59,17 @@ build_script: test_script: - ps: Invoke-Build -Task Test +before_deploy: + - ps: Invoke-Build -Task Deploy + +deploy: + provider: GitHub + release: v$(appveyor_build_version) + description: '' + auth_token: + secure: m72Ke3nJcSxZkc36UwRIw+q0NtNvERfQYHZUBNDvLP/kjW+mWmVueR6tmgBujyBM + draft: false + prerelease: false + on: + branch: master # release from master branch only + appveyor_repo_tag: false # deploy on tag push only \ No newline at end of file diff --git a/docs/Get-Asset.md b/docs/Get-Asset.md new file mode 100644 index 0000000..0be936a --- /dev/null +++ b/docs/Get-Asset.md @@ -0,0 +1,73 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# Get-Asset + +## SYNOPSIS +# Gets a list of Snipe-it Assets + +## SYNTAX + +``` +Get-Asset [-url] [-apiKey] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### -------------------------- EXAMPLE 1 -------------------------- +``` +Get-Asset -url "https://assets.dip.co.uk" -token "token..." +``` + +### -------------------------- EXAMPLE 2 -------------------------- +``` +Get-Asset -url "https://assets.dip.co.uk" -token "token..." | Where-Object {$_.name -eq "SUPPORT23" } +``` + +## PARAMETERS + +### -url +URL of Snipeit system, can be set using Set-Info command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +Users API Key for Snipeit, can be set using Set-Info command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS + diff --git a/docs/Get-Category.md b/docs/Get-Category.md new file mode 100644 index 0000000..bbbca5a --- /dev/null +++ b/docs/Get-Category.md @@ -0,0 +1,75 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# Get-Category + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Get-Category [-url] [-apiKey] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/Get-Component.md b/docs/Get-Component.md new file mode 100644 index 0000000..d19612d --- /dev/null +++ b/docs/Get-Component.md @@ -0,0 +1,75 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# Get-Component + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Get-Component [-url] [-apiKey] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/Get-Manufacturer.md b/docs/Get-Manufacturer.md new file mode 100644 index 0000000..f29d362 --- /dev/null +++ b/docs/Get-Manufacturer.md @@ -0,0 +1,75 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# Get-Manufacturer + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Get-Manufacturer [-url] [-apiKey] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/Get-Model.md b/docs/Get-Model.md new file mode 100644 index 0000000..215ba79 --- /dev/null +++ b/docs/Get-Model.md @@ -0,0 +1,75 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# Get-Model + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Get-Model [-url] [-apiKey] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/Get-Status.md b/docs/Get-Status.md new file mode 100644 index 0000000..6eea36f --- /dev/null +++ b/docs/Get-Status.md @@ -0,0 +1,75 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# Get-Status + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Get-Status [-url] [-apiKey] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/Get-User.md b/docs/Get-User.md new file mode 100644 index 0000000..31ccdb6 --- /dev/null +++ b/docs/Get-User.md @@ -0,0 +1,73 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# Get-User + +## SYNOPSIS +# Gets a list of Snipe-it Users + +## SYNTAX + +``` +Get-User [-url] [-apiKey] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### -------------------------- EXAMPLE 1 -------------------------- +``` +Get-Users -url "https://assets.dip.co.uk" -token "token..." +``` + +### -------------------------- EXAMPLE 2 -------------------------- +``` +Get-Users -url "https://assets.dip.co.uk" -token "token..." | Where-Object {$_.username -eq "stephenm" } +``` + +## PARAMETERS + +### -url +URL of Snipeit system, can be set using Set-Info command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +Users API Key for Snipeit, can be set using Set-Info command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS + diff --git a/docs/New-Asset.md b/docs/New-Asset.md new file mode 100644 index 0000000..30fbb22 --- /dev/null +++ b/docs/New-Asset.md @@ -0,0 +1,167 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# New-Asset + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +New-Asset [-Name] [-Status_id] [-Model_id] [-url] [-apiKey] + [[-customfields] ] [-WhatIf] [-Confirm] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Model_id +{{Fill Model_id Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +{{Fill Name Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Status_id +{{Fill Status_id Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -customfields +{{Fill customfields Description}} + +```yaml +Type: Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/New-Component.md b/docs/New-Component.md new file mode 100644 index 0000000..8d4bba7 --- /dev/null +++ b/docs/New-Component.md @@ -0,0 +1,152 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# New-Component + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +New-Component [-name] [-category_id] [-qty] [-url] [-apiKey] + [-WhatIf] [-Confirm] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -category_id +{{Fill category_id Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -name +{{Fill name Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -qty +{{Fill qty Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/New-Manufacturer.md b/docs/New-Manufacturer.md new file mode 100644 index 0000000..5616130 --- /dev/null +++ b/docs/New-Manufacturer.md @@ -0,0 +1,121 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# New-Manufacturer + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +New-Manufacturer [-Name] [-url] [-apiKey] [-WhatIf] [-Confirm] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +{{Fill Name Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/New-Model.md b/docs/New-Model.md new file mode 100644 index 0000000..06b064b --- /dev/null +++ b/docs/New-Model.md @@ -0,0 +1,167 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# New-Model + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +New-Model [-name] [-category_id] [-manufacturer_id] [-fieldset_id] + [-url] [-apiKey] [-WhatIf] [-Confirm] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -category_id +{{Fill category_id Description}} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -fieldset_id +{{Fill fieldset_id Description}} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -manufacturer_id +{{Fill manufacturer_id Description}} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -name +{{Fill name Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/Set-Asset.md b/docs/Set-Asset.md new file mode 100644 index 0000000..d578e3b --- /dev/null +++ b/docs/Set-Asset.md @@ -0,0 +1,182 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# Set-Asset + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Set-Asset [-id] [-Name] [-Status_id] [-Model_id] [-url] + [-apiKey] [[-customfields] ] [-WhatIf] [-Confirm] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Model_id +{{Fill Model_id Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +{{Fill Name Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Status_id +{{Fill Status_id Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -customfields +{{Fill customfields Description}} + +```yaml +Type: Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -id +{{Fill id Description}} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/Set-AssetOwner.md b/docs/Set-AssetOwner.md new file mode 100644 index 0000000..1e3b9f2 --- /dev/null +++ b/docs/Set-AssetOwner.md @@ -0,0 +1,136 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# Set-AssetOwner + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Set-AssetOwner [-id] [-user_id] [-url] [-apiKey] [-WhatIf] [-Confirm] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -id +{{Fill id Description}} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -user_id +{{Fill user_id Description}} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/Set-Component.md b/docs/Set-Component.md new file mode 100644 index 0000000..79a41d0 --- /dev/null +++ b/docs/Set-Component.md @@ -0,0 +1,136 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# Set-Component + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Set-Component [-id] [-qty] [-url] [-apiKey] [-WhatIf] [-Confirm] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -id +{{Fill id Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -qty +{{Fill qty Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS + diff --git a/docs/Set-Info.md b/docs/Set-Info.md new file mode 100644 index 0000000..53cb63a --- /dev/null +++ b/docs/Set-Info.md @@ -0,0 +1,75 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeItPS +online version: +schema: 2.0.0 +--- + +# Set-Info + +## SYNOPSIS +{{Fill in the Synopsis}} + +## SYNTAX + +``` +Set-Info [[-url] ] [[-apiKey] ] +``` + +## DESCRIPTION +{{Fill in the Description}} + +## EXAMPLES + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -apiKey +{{Fill apiKey Description}} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +{{Fill url Description}} + +```yaml +Type: Uri +Parameter Sets: (All) +Aliases: + +Required: False +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### None + + +## OUTPUTS + +### System.Object + +## NOTES + +## RELATED LINKS +