new Connect-SnipeitPS command

This commit is contained in:
Petri Asikainen 2021-08-02 08:13:25 +03:00
parent 4c0b9b0e85
commit 0afd33368b
2 changed files with 15 additions and 0 deletions

View file

@ -70,6 +70,7 @@ PowerShellVersion = '5.1'
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @(
'Connect-SnipeitPS',
'Get-SnipeitAccessory',
'Get-SnipeitAccessoryOwner',
'Get-SnipeitActivity',

View file

@ -16,3 +16,17 @@ Get-ChildItem $scriptRoot *.ps1 | ForEach-Object {
#Create unprefixed aliases
Set-SnipeitAlias
#Session variable for storing current session information
$SnipeitPSSession = [ordered]@{
'url' = $null
'apiKey' = $null
}
New-Variable -Name SnipeitPSSession -Value $SnipeitPSSession -Scope Script -Force
#Config variable
$SnipeitPSConfig = [ordered]@{
'latest' = $null
'connections' = [ordered]@{}
}
New-Variable -Name SnipeitPSConfig -Value $SnipeitPSConfig -Scope Script -Force