mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 01:42:29 +00:00
Renamed helper funtions
This commit is contained in:
parent
e934d20ced
commit
bc0b266339
75 changed files with 156 additions and 155 deletions
|
|
@ -34,9 +34,12 @@ function Invoke-SnipeitMethod {
|
|||
)
|
||||
|
||||
BEGIN {
|
||||
$Url = $SnipeitPSSession.url
|
||||
$Token = $SnipeitPSSession.apiKey
|
||||
|
||||
if ( $null -eq $SnipeitPSSession.url -or $null -eq $SnipeitPSSession.apiKey ) {
|
||||
throw "Cannot connect to Snipe it.Please run Connect-SnipePS to set connection information."
|
||||
} else {
|
||||
$Url = $SnipeitPSSession.url
|
||||
$Token = $SnipeitPSSession.apiKey | ConvertFrom-SecureString -AsPlainText
|
||||
}
|
||||
# Validation of parameters
|
||||
if (($Method -in ("POST", "PUT", "PATCH")) -and (!($Body))) {
|
||||
$message = "The following parameters are required when using the ${Method} parameter: Body."
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
function Set-SnipeitPSSessionApiKey {
|
||||
function Set-SnipeitPSLegacyApiKey {
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Low"
|
||||
|
|
@ -8,7 +8,7 @@ function Set-SnipeitPSSessionApiKey {
|
|||
)
|
||||
process {
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
$SnipeitPSSession.apiKey = $apiKey
|
||||
$SnipeitPSSession.apiKey = $apiKey | ConvertTo-SecureString -AsPlainText
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
function Set-SnipeitPSSessionUrl {
|
||||
function Set-SnipeitPSLegacyUrl {
|
||||
[CmdletBinding(
|
||||
SupportsShouldProcess = $true,
|
||||
ConfirmImpact = "Low"
|
||||
|
|
@ -45,7 +45,6 @@ function Connect-SnipeitPS {
|
|||
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseShouldProcessForStateChangingFunctions', '')]
|
||||
|
||||
param (
|
||||
|
||||
[Parameter(ParameterSetName='Connect with url and apikey',Mandatory=$true)]
|
||||
[Parameter(ParameterSetName='Connect with url and secure apikey',Mandatory=$true)]
|
||||
[Uri]$url,
|
||||
|
|
@ -54,12 +53,10 @@ function Connect-SnipeitPS {
|
|||
[String]$apiKey,
|
||||
|
||||
[Parameter(ParameterSetName='Connect with url and secure apikey',Mandatory=$true)]
|
||||
[SecureString]$SecureApiKey,
|
||||
|
||||
[SecureString]$secureApiKey,
|
||||
|
||||
[Parameter(ParameterSetName='Connect with credential',Mandatory=$true)]
|
||||
[PSCredertial]$siteCred
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -80,8 +77,9 @@ function Connect-SnipeitPS {
|
|||
$SnipeitPSSession.apiKey = $siteCred.GetNetworkCredential().SecurePassword
|
||||
}
|
||||
}
|
||||
|
||||
if (-not (Test-SnipeitPSConnection)) {
|
||||
throw "Cannot verify connection to snipe it. For the start check url and provided apikey"
|
||||
throw "Cannot verify connection to snipe it. For the start try to check url and provided apikey or credentials"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,12 +103,12 @@ function Get-SnipeitAccessory() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -40,12 +40,12 @@ function Get-SnipeitAccessoryOwner() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -99,12 +99,12 @@ function Get-SnipeitActivity() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -229,12 +229,12 @@ function Get-SnipeitAsset() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -73,12 +73,12 @@ function Get-SnipeitAssetMaintenance() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -81,12 +81,12 @@ function Get-SnipeitCategory() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -83,12 +83,12 @@ function Get-SnipeitCompany() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -100,12 +100,12 @@ function Get-SnipeitComponent() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -118,12 +118,12 @@ function Get-SnipeitConsumable() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
@ -157,12 +157,12 @@ function Get-SnipeitConsumable() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
$result = Invoke-SnipeitMethod @Parameters
|
||||
|
|
|
|||
|
|
@ -48,12 +48,12 @@ function Get-SnipeitCustomField() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -89,12 +89,12 @@ function Get-SnipeitDepartment() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ function Get-SnipeitFieldset() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
$result = Invoke-SnipeitMethod @Parameters
|
||||
|
|
|
|||
|
|
@ -124,12 +124,12 @@ function Get-SnipeitLicense() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -73,12 +73,12 @@ function Get-SnipeitLicenseSeat() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -82,12 +82,12 @@ function Get-SnipeitLocation() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -83,12 +83,12 @@ function Get-SnipeitManufacturer() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -82,12 +82,12 @@ function Get-SnipeitModel() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -82,12 +82,12 @@ function Get-SnipeitStatus() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -81,12 +81,12 @@ function Get-SnipeitSupplier() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -114,12 +114,12 @@ function Get-SnipeitUser() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($all) {
|
||||
|
|
|
|||
|
|
@ -132,12 +132,12 @@ function New-SnipeitAccessory() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -177,12 +177,12 @@ function New-SnipeitAsset() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -98,12 +98,12 @@ function New-SnipeitAssetMaintenance() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ function New-SnipeitAudit() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -85,12 +85,12 @@ function New-SnipeitCategory() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ function New-SnipeitCompany() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -93,12 +93,12 @@ function New-SnipeitComponent() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -133,12 +133,12 @@ function New-SnipeitConsumable() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -89,11 +89,11 @@ function New-SnipeitCustomField() {
|
|||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,12 +73,12 @@ function New-SnipeitDepartment() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -148,12 +148,12 @@ function New-SnipeitLicense() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -105,12 +105,12 @@ function New-SnipeitLocation() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -60,12 +60,12 @@ function New-SnipeitManufacturer() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -87,12 +87,12 @@ function New-SnipeitModel() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -109,12 +109,12 @@ function New-SnipeitSupplier() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -133,12 +133,12 @@ function New-SnipeitUser() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ function Remove-SnipeitAccessory () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -48,12 +48,12 @@ function Remove-SnipeitAsset () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ function Remove-SnipeitAssetMaintenance {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -46,12 +46,12 @@ function Remove-SnipeitCategory () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -46,12 +46,12 @@ function Remove-SnipeitCompany () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ function Remove-SnipeitComponent () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -48,12 +48,12 @@ function Remove-SnipeitConsumable () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@ function Remove-SnipeitCustomField () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -46,12 +46,12 @@ function Remove-SnipeitDepartment () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ function Remove-SnipeitLicense () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ function Remove-SnipeitLocation () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ function Remove-SnipeitManufacturer () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ function Remove-SnipeitModel () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ function Remove-SnipeitSupplier () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -46,12 +46,12 @@ function Remove-SnipeitUser () {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@ function Reset-SnipeitAccessoryOwner() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -63,12 +63,12 @@ function Reset-SnipeitAssetOwner() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -134,12 +134,12 @@ function Set-SnipeitAccessory() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -57,12 +57,12 @@ function Set-SnipeitAccessoryOwner() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -166,12 +166,12 @@ function Set-SnipeitAsset() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -101,12 +101,12 @@ function Set-SnipeitAssetOwner() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -94,12 +94,12 @@ function Set-SnipeitCategory() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -74,12 +74,12 @@ function Set-SnipeitCompany() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -114,12 +114,12 @@ function Set-SnipeitComponent() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -154,12 +154,12 @@ function Set-SnipeitConsumable() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -99,12 +99,12 @@ function Set-SnipeitCustomField() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -90,12 +90,12 @@ function Set-SnipeitDepartment() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -163,12 +163,12 @@ function Set-SnipeitLicense() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -84,12 +84,12 @@ function Set-SnipeitLicenseSeat() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -128,12 +128,12 @@ function Set-SnipeitLocation() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -68,12 +68,12 @@ function Set-SnipeitManufacturer() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -97,12 +97,12 @@ function Set-SnipeitModel() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -79,12 +79,12 @@ function Set-SnipeitStatus() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -124,12 +124,12 @@ function Set-SnipeitSupplier() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
|
|
@ -151,12 +151,12 @@ function Set-SnipeitUser() {
|
|||
|
||||
if ($PSBoundParameters.ContainsKey('apiKey')) {
|
||||
Write-Warning "-apiKey parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionApiKey -apiKey $apikey
|
||||
Set-SnipeitPSLegacyApiKey -apiKey $apikey
|
||||
}
|
||||
|
||||
if ($PSBoundParameters.ContainsKey('url')) {
|
||||
Write-Warning "-url parameter is deprecated, please use Connect-SnipeitPS instead."
|
||||
Set-SnipeitPSSessionUrl -url $url
|
||||
Set-SnipeitPSLegacyUrl -url $url
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue