Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions maintenance/manifestUpdate.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$myMod = 'verkadaModule'
$mypath = $PSScriptRoot | Split-Path -Parent
import-Module $mypath/$myMod/$myMod.psm1
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/*.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/ -Recurse -Include *.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
import-Module $mypath/$myMod/$myMod.psm1 -Force
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/*.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/ -Recurse -Include *.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
38 changes: 33 additions & 5 deletions maintenance/release.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
$myMod = 'verkadaModule'
$mypath = $PSScriptRoot | Split-Path -Parent
import-Module $mypath/$myMod/$myMod.psm1
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/*.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/ -Recurse -Include *.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
import-Module $mypath/$myMod/$myMod.psm1 -Force
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/*.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
new-MarkdownHelp -Module $myMod -OutputFolder $mypath/docs/function-documentation -Force | Out-Null
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/ -Recurse -Include *.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
Get-ChildItem -Path $mypath/docs/function-documentation -Recurse | Remove-Item -Force -Recurse -Confirm:$false | Out-Null
New-MarkdownHelp -Module $myMod -OutputFolder $mypath/docs/function-documentation -Force | Out-Null

Write-output "# Verkada PowerShell module" | Out-File $mypath/docs/reference.md -Force
Write-output "# Verkada PowerShell module`n" | Out-File $mypath/docs/reference.md -Force
Write-output "## Command Documentation" | Out-File $mypath/docs/reference.md -Append
Get-ChildItem -Path $mypath/$myMod/Public/*.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName | ForEach-Object {write-output "* [$_](function-documentation/$_.md)"} | Out-File $mypath/docs/reference.md -Append

Get-ChildItem $mypath/$myMod/Public/ | ForEach-Object {
If(!($_.BaseName -eq 'Legacy')){
Write-Output "`n### $($_.BaseName)`n" | Out-File $mypath/docs/reference.md -Append
$tempDir=$_.BaseName
Get-ChildItem $_ | ForEach-Object {
if (!(Test-Path -Path "$mypath/docs/function-documentation/$tempDir/" -PathType Container)) {
New-Item -Path "$mypath/docs/function-documentation/$tempDir/" -ItemType Directory -Force
}
Move-Item -Path "$mypath/docs/function-documentation/$($_.BaseName).md" -Destination "$mypath/docs/function-documentation/$tempDir/" -Force
Write-Output "* [$($_.BaseName)](function-documentation/$tempDir/$($_.BaseName).md)" | Out-File $mypath/docs/reference.md -Append
}
} else {
Write-Output `n"### Legacy" | Out-File $mypath/docs/reference.md -Append
$tempDir=$_.BaseName
Get-ChildItem $_ | ForEach-Object {
Write-Output "`n#### Legacy $($_.BaseName)`n" | Out-File $mypath/docs/reference.md -Append
$tempDir2=$_.BaseName
Get-ChildItem $_ | ForEach-Object {
if (!(Test-Path -Path "$mypath/docs/function-documentation/$tempDir/$tempDir2/" -PathType Container)) {
New-Item -Path "$mypath/docs/function-documentation/$tempDir/$tempDir2/" -ItemType Directory -Force
}
Move-Item -Path "$mypath/docs/function-documentation/$($_.BaseName).md" -Destination "$mypath/docs/function-documentation/$tempDir/$tempDir2/" -Force
Write-Output "* [$($_.BaseName)](function-documentation/$tempDir/$tempDir2/$($_.BaseName).md)" | Out-File $mypath/docs/reference.md -Append
}
}
}
}

$manifest = Import-PowerShellDataFile "$mypath/$myMod/$myMod.psd1"
[version]$version = $Manifest.ModuleVersion
Expand Down
38 changes: 33 additions & 5 deletions maintenance/updateMod.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
$myMod = 'verkadaModule'
$mypath = $PSScriptRoot | Split-Path -Parent
import-Module $mypath/$myMod/$myMod.psm1
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/*.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/ -Recurse -Include *.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
import-Module $mypath/$myMod/$myMod.psm1 -Force
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/*.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
new-MarkdownHelp -Module $myMod -OutputFolder $mypath/docs/function-documentation -Force | Out-Null
update-ModuleManifest -Path "$mypath/$myMod/$myMod.psd1" -FunctionsToExport (Get-ChildItem -Path $mypath/$myMod/Public/ -Recurse -Include *.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName) -AliasesToExport (Get-Command -Module verkadaModule | ForEach-Object {Get-Alias -Definition $_.name -ea 0} | Select-Object -ExpandProperty Name)
Get-ChildItem -Path $mypath/docs/function-documentation -Recurse | Remove-Item -Force -Recurse -Confirm:$false | Out-Null
New-MarkdownHelp -Module $myMod -OutputFolder $mypath/docs/function-documentation -Force | Out-Null

Write-output "# Verkada PowerShell module" | Out-File $mypath/docs/reference.md -Force
Write-output "# Verkada PowerShell module`n" | Out-File $mypath/docs/reference.md -Force
Write-output "## Command Documentation" | Out-File $mypath/docs/reference.md -Append
Get-ChildItem -Path $mypath/$myMod/Public/*.ps1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty BaseName | ForEach-Object {write-output "* [$_](function-documentation/$_.md)"} | Out-File $mypath/docs/reference.md -Append

Get-ChildItem $mypath/$myMod/Public/ | ForEach-Object {
If(!($_.BaseName -eq 'Legacy')){
Write-Output "`n### $($_.BaseName)`n" | Out-File $mypath/docs/reference.md -Append
$tempDir=$_.BaseName
Get-ChildItem $_ | ForEach-Object {
if (!(Test-Path -Path "$mypath/docs/function-documentation/$tempDir/" -PathType Container)) {
New-Item -Path "$mypath/docs/function-documentation/$tempDir/" -ItemType Directory -Force
}
Move-Item -Path "$mypath/docs/function-documentation/$($_.BaseName).md" -Destination "$mypath/docs/function-documentation/$tempDir/" -Force
Write-Output "* [$($_.BaseName)](function-documentation/$tempDir/$($_.BaseName).md)" | Out-File $mypath/docs/reference.md -Append
}
} else {
Write-Output `n"### Legacy" | Out-File $mypath/docs/reference.md -Append
$tempDir=$_.BaseName
Get-ChildItem $_ | ForEach-Object {
Write-Output "`n#### Legacy $($_.BaseName)`n" | Out-File $mypath/docs/reference.md -Append
$tempDir2=$_.BaseName
Get-ChildItem $_ | ForEach-Object {
if (!(Test-Path -Path "$mypath/docs/function-documentation/$tempDir/$tempDir2/" -PathType Container)) {
New-Item -Path "$mypath/docs/function-documentation/$tempDir/$tempDir2/" -ItemType Directory -Force
}
Move-Item -Path "$mypath/docs/function-documentation/$($_.BaseName).md" -Destination "$mypath/docs/function-documentation/$tempDir/$tempDir2/" -Force
Write-Output "* [$($_.BaseName)](function-documentation/$tempDir/$tempDir2/$($_.BaseName).md)" | Out-File $mypath/docs/reference.md -Append
}
}
}
}

$manifest = Import-PowerShellDataFile "$mypath/$myMod/$myMod.psd1"
[version]$version = $Manifest.ModuleVersion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function Send-VerkadaPassInvite{
function Send-VerkadaAccessPassInvite{
<#
.SYNOPSIS
Send a Verkada Pass email invited to an Access user in an organization using https://apidocs.verkada.com/reference/postsendpassappinviteviewv1
Expand All @@ -8,22 +8,22 @@ function Send-VerkadaPassInvite{
The reqired token can be directly submitted as a parameter, but is much easier to use Connect-Verkada to cache this information ahead of time and for subsequent commands.

.LINK
https://github.com/bepsoccer/verkadaModule/blob/master/docs/function-documentation/Send-VerkadaPassInvite.md
https://github.com/bepsoccer/verkadaModule/blob/master/docs/function-documentation/Send-VerkadaAccessPassInvite.md

.EXAMPLE
Send-VerkadaPassInvite -userId '801c9551-b04c-4293-84ad-b0a6aa0588b3'
Send-VerkadaAccessPassInvite -userId '801c9551-b04c-4293-84ad-b0a6aa0588b3'
This will send an email invite to an Access user with userId 801c9551-b04c-4293-84ad-b0a6aa0588b3. The token will be populated from the cache created by Connect-Verkada.

.EXAMPLE
Send-VerkadaPassInvite -userId '801c9551-b04c-4293-84ad-b0a6aa0588b3' -activateBLE
Send-VerkadaAccessPassInvite -userId '801c9551-b04c-4293-84ad-b0a6aa0588b3' -activateBLE
This will send an email invite to an Access user with userId 801c9551-b04c-4293-84ad-b0a6aa0588b3 and activate BLE unlocks. The token will be populated from the cache created by Connect-Verkada.

.EXAMPLE
Send-VerkadaPassInvite -externalId 'newUserUPN@contoso.com' -x_verkada_auth_api 'sd78ds-uuid-of-verkada-token'
Send-VerkadaAccessPassInvite -externalId 'newUserUPN@contoso.com' -x_verkada_auth_api 'sd78ds-uuid-of-verkada-token'
This will send an email invite to an Access user with -externalId 'newUserUPN@contoso.com'. The token is submitted as a parameter in the call.
#>
[CmdletBinding(PositionalBinding = $true)]
[Alias("Send-VrkdaPssInv","sd-VrkdaPssInv")]
[Alias("Send-VrkdaAcPssInv","sd-VrkdaAcPssInv","Send-VrkdaPssInv","sd-VrkdaPssInv","Send-VerkadaPassInvite")]
param (
#The UUID of the user
[Parameter(ValueFromPipelineByPropertyName = $true)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function Get-VerkadaCommandUser{
<#
.SYNOPSIS
using https://apidocs.verkada.com/reference/getuserviewv1
Gets a Command user using https://apidocs.verkada.com/reference/getuserviewv1

.DESCRIPTION
Returns a user for an organization based on either provided user ID or an external ID set during creation.
Expand Down
Loading