This commit is contained in:
Stephen Maunder 2017-11-18 19:50:47 +00:00
parent 7afbb7d8ab
commit 8825c4e5f5
18 changed files with 1676 additions and 20 deletions

27
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,27 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "PowerShell",
"request": "launch",
"name": "PowerShell Interactive Session",
"cwd": "${workspaceRoot}"
},
{
"type": "PowerShell",
"request": "launch",
"name": "PowerShell Pester Tests",
"script": "Invoke-Pester",
"args": [],
"cwd": "${workspaceRoot}"
},
{
"type": "PowerShell",
"request": "launch",
"name": "PowerShell Launch (current file)",
"script": "${file}",
"args": [],
"cwd": "${file}"
}
]
}

View file

@ -10,15 +10,20 @@ if ($PSBoundParameters.ContainsKey('Verbose')) {
if (!($env:releasePath)) {
$releasePath = "$BuildRoot\Release"
}
else {
elseif ($env:releasePath) {
$releasePath = $env:releasePath
}
else {
$releasePath = "$($pwd.Path)\Release"
}
$env:PSModulePath = "$($env:PSModulePath);$releasePath"
Import-Module BuildHelpers
# Ensure Invoke-Build works in the most strict mode.
Set-StrictMode -Version Latest
# region debug information
task ShowDebug {
Write-Build Gray
Write-Build Gray ('Project name: {0}' -f $env:APPVEYOR_PROJECT_NAME)
@ -42,12 +47,85 @@ task ShowDebug {
Write-Build Gray
}
# Synopsis: Install pandoc to .\Tools\
task InstallPandoc -If (-not (Test-Path Tools\pandoc.exe)) {
# Setup
if (-not (Test-Path "$BuildRoot\Tools")) {
$null = New-Item -Path "$BuildRoot\Tools" -ItemType Directory
}
# Get latest bits
$latestRelease = "https://github.com/jgm/pandoc/releases/download/1.19.2.1/pandoc-1.19.2.1-windows.msi"
Invoke-WebRequest -Uri $latestRelease -OutFile "$($env:temp)\pandoc.msi"
# Extract bits
$null = New-Item -Path $env:temp\pandoc -ItemType Directory -Force
Start-Process -Wait -FilePath msiexec.exe -ArgumentList " /qn /a `"$($env:temp)\pandoc.msi`" targetdir=`"$($env:temp)\pandoc\`""
# Move to Tools folder
Copy-Item -Path "$($env:temp)\pandoc\Pandoc\pandoc.exe" -Destination "$BuildRoot\Tools\"
Copy-Item -Path "$($env:temp)\pandoc\Pandoc\pandoc-citeproc.exe" -Destination "$BuildRoot\Tools\"
# Clean
Remove-Item -Path "$($env:temp)\pandoc" -Recurse -Force
}
# endregion
# region test
task Test RapidTest
# Synopsis: Using the "Fast" Test Suit
task RapidTest PesterTests
# Synopsis: Using the complete Test Suit, which includes all supported Powershell versions
task FullTest TestVersions
# Synopsis: Warn about not empty git status if .git exists.
task GitStatus -If (Test-Path .git) {
$status = exec { git status -s }
if ($status) {
Write-Warning "Git status: $($status -join ', ')"
}
}
task TestVersions TestPS3, TestPS4, TestPS4, TestPS5
task TestPS3 {
exec {powershell.exe -Version 3 -NoProfile Invoke-Build PesterTests}
}
task TestPS4 {
exec {powershell.exe -Version 4 -NoProfile Invoke-Build PesterTests}
}
task TestPS5 {
exec {powershell.exe -Version 5 -NoProfile Invoke-Build PesterTests}
}
# Synopsis: Invoke Pester Tests
task PesterTests CreateHelp, {
try {
$result = Invoke-Pester -PassThru -OutputFile "$BuildRoot\TestResult.xml" -OutputFormat "NUnitXml"
if ($env:APPVEYOR_PROJECT_NAME) {
Add-TestResultToAppveyor -TestFile "$BuildRoot\TestResult.xml"
Remove-Item "$BuildRoot\TestResult.xml" -Force
}
assert ($result.FailedCount -eq 0) "$($result.FailedCount) Pester test(s) failed."
}
catch {
throw
}
}
# endregion
# region build
# Synopsis: Build shippable release
task Build GenerateRelease, UpdateManifest
task Build GenerateRelease, ConvertMarkdown, UpdateManifest
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 {
task GenerateRelease CreateHelp, {
# Setup
if (-not (Test-Path "$releasePath\SnipeitPS")) {
$null = New-Item -Path "$releasePath\SnipeitPS" -ItemType Directory
@ -56,26 +134,19 @@ task GenerateRelease {
# Copy module
Copy-Item -Path "$BuildRoot\SnipeitPS\*" -Destination "$releasePath\SnipeitPS" -Recurse -Force
# Copy additional files
<#$additionalFiles = @(
$additionalFiles = @(
"$BuildRoot\CHANGELOG.md"
"$BuildRoot\LICENSE"
"$BuildRoot\README.md"
#"$BuildRoot\LICENSE"
#"$BuildRoot\README.md"
)
Copy-Item -Path $additionalFiles -Destination "$releasePath\SnipeitPS" -Force#>
Copy-Item -Path $additionalFiles -Destination "$releasePath\SnipeitPS" -Force
}
# Synopsis: Update the manifest of the module
task UpdateManifest GetVersion, {
$ModuleAlias = (Get-Alias | Where source -eq JiraPS)
Remove-Module JiraPS -ErrorAction SilentlyContinue
Import-Module "$releasePath\SnipeitPS\SnipeitPS.psd1"
Update-Metadata -Path "$releasePath\SnipeitPS\SnipeitPS.psd1" -PropertyName ModuleVersion -Value $script:Version
# Update-Metadata -Path "$releasePath\SnipeitPS\SnipeitPS.psd1" -PropertyName FileList -Value (Get-ChildItem $releasePath\SnipeitPS -Recurse).Name
if ($ModuleAlias) {
Update-Metadata -Path "$releasePath\SnipeitPS\SnipeitPS.psd1" -PropertyName AliasesToExport -Value @($ModuleAlias.Name)
}
Set-ModuleFunctions -Name "$releasePath\SnipeitPS\SnipeitPS.psd1" -FunctionsToExport ([string[]](Get-ChildItem "SnipeitPS\public\*.psm1").BaseName)
$functionsToExport = Get-ChildItem "$BuildRoot\SnipeitPS\Public" | ForEach-Object {$_.BaseName}
Set-ModuleFunctions -Name "$releasePath\SnipeitPS\SnipeitPS.psd1" -FunctionsToExport $functionsToExport
}
task GetVersion {
@ -96,22 +167,39 @@ task GetVersion {
$newRevision
}
# Synopsis: Convert markdown files to HTML.
# <http://johnmacfarlane.net/pandoc/>
$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
# endregion
#region Cleaning tasks
task Clean RemoveGeneratedFiles
# Synopsis: Remove generated and temp files.
task RemoveGeneratedFiles {
$itemsToRemove = @(
'Release'
'*.htm'
'TestResult.xml'
'SnipeitPS\en-US\*'
)
Remove-Item $itemsToRemove -Force -Recurse -ErrorAction 0
}
task RemoveMarkdownFiles {
Remove-Item "$releasePath\SnipeitPS\*.md" -Force -ErrorAction 0
}
# endregion
task . Build, Clean
task . ShowDebug, Clean, Test, Build, Deploy

View file

@ -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] <String> [-apiKey] <String>
```
## 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

View file

@ -0,0 +1,75 @@
---
external help file: SnipeItPS-help.xml
Module Name: SnipeItPS
online version:
schema: 2.0.0
---
# Get-Categories
## SYNOPSIS
{{Fill in the Synopsis}}
## SYNTAX
```
Get-Categories [-url] <String> [-apiKey] <String>
```
## 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

View file

@ -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] <String> [-apiKey] <String>
```
## 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

View file

@ -0,0 +1,75 @@
---
external help file: SnipeItPS-help.xml
Module Name: SnipeItPS
online version:
schema: 2.0.0
---
# Get-Manufacturers
## SYNOPSIS
{{Fill in the Synopsis}}
## SYNTAX
```
Get-Manufacturers [-url] <String> [-apiKey] <String>
```
## 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

View file

@ -0,0 +1,75 @@
---
external help file: SnipeItPS-help.xml
Module Name: SnipeItPS
online version:
schema: 2.0.0
---
# Get-Models
## SYNOPSIS
{{Fill in the Synopsis}}
## SYNTAX
```
Get-Models [-url] <String> [-apiKey] <String>
```
## 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

View file

@ -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] <String> [-apiKey] <String>
```
## 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

View file

@ -0,0 +1,73 @@
---
external help file: SnipeItPS-help.xml
Module Name: SnipeItPS
online version:
schema: 2.0.0
---
# Get-Users
## SYNOPSIS
# Gets a list of Snipe-it Users
## SYNTAX
```
Get-Users [-url] <String> [-apiKey] <String>
```
## 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

View file

@ -0,0 +1,102 @@
---
external help file: SnipeItPS-help.xml
Module Name: SnipeItPS
online version:
schema: 2.0.0
---
# Invoke-Method
## SYNOPSIS
Extracted invokation of the REST method to own function.
## SYNTAX
```
Invoke-Method [-URi] <Uri> [[-Method] <String>] [[-Body] <String>] [[-Token] <String>]
```
## DESCRIPTION
{{Fill in the Description}}
## EXAMPLES
### Example 1
```
PS C:\> {{ Add example code here }}
```
{{ Add example description here }}
## PARAMETERS
### -URi
REST API to invoke
```yaml
Type: Uri
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Method
Method of the invokation
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: GET
Accept pipeline input: False
Accept wildcard characters: False
```
### -Body
Body of the request
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Token
{{Fill Token Description}}
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
## INPUTS
## OUTPUTS
### System.Management.Automation.PSObject
## NOTES
## RELATED LINKS

136
SnipeitPS/docs/New-Asset.md Normal file
View file

@ -0,0 +1,136 @@
---
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] <String> [-Status_id] <String> [-Model_id] <String> [-url] <String> [-apiKey] <String>
[[-customfields] <Hashtable>]
```
## DESCRIPTION
{{Fill in the Description}}
## EXAMPLES
### Example 1
```
PS C:\> {{ Add example code here }}
```
{{ Add example description here }}
## PARAMETERS
### -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
```
### -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

View file

@ -0,0 +1,120 @@
---
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] <String> [-category_id] <String> [-qty] <String> [-url] <String> [-apiKey] <String>
```
## 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: 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

View file

@ -0,0 +1,90 @@
---
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] <String> [-url] <String> [-apiKey] <String>
```
## DESCRIPTION
{{Fill in the Description}}
## EXAMPLES
### Example 1
```
PS C:\> {{ Add example code here }}
```
{{ Add example description here }}
## PARAMETERS
### -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
```
### -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

136
SnipeitPS/docs/New-Model.md Normal file
View file

@ -0,0 +1,136 @@
---
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] <String> [-category_id] <Int32> [-manufacturer_id] <Int32> [-fieldset_id] <Int32>
[-url] <String> [-apiKey] <String>
```
## 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: 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

151
SnipeitPS/docs/Set-Asset.md Normal file
View file

@ -0,0 +1,151 @@
---
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] <Int32> [-Name] <String> [-Status_id] <String> [-Model_id] <String> [-url] <String>
[-apiKey] <String> [[-customfields] <Hashtable>]
```
## DESCRIPTION
{{Fill in the Description}}
## EXAMPLES
### Example 1
```
PS C:\> {{ Add example code here }}
```
{{ Add example description here }}
## PARAMETERS
### -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
```
### -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

View file

@ -0,0 +1,105 @@
---
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] <Int32> [-user_id] <Int32> [-url] <String> [-apiKey] <String>
```
## 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: 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

View file

@ -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] <Uri>] [[-apiKey] <String>]
```
## 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

View file

@ -0,0 +1,105 @@
---
external help file: SnipeItPS-help.xml
Module Name: SnipeItPS
online version:
schema: 2.0.0
---
# Update-Component
## SYNOPSIS
{{Fill in the Synopsis}}
## SYNTAX
```
Update-Component [-id] <String> [-qty] <String> [-url] <String> [-apiKey] <String>
```
## 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: 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