From bc645fc0d8e2667d4e5619d7b7bd3beaec1d4b99 Mon Sep 17 00:00:00 2001 From: Arnike Date: Sat, 17 Dec 2022 01:51:55 +0300 Subject: [PATCH] Added Close-Session cmdlet --- functions/public/Close-Session.ps1 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 functions/public/Close-Session.ps1 diff --git a/functions/public/Close-Session.ps1 b/functions/public/Close-Session.ps1 new file mode 100644 index 0000000..2517d3c --- /dev/null +++ b/functions/public/Close-Session.ps1 @@ -0,0 +1,20 @@ +function Close-Session { + <# + .SYNOPSIS + + Removes (revokes) token. + #> + [CmdletBinding()] + param() + process { + $_params = @{ + Controller = [PS.IPAM.controllers]::user + Method = "DELETE" + } + + Invoke-Request @_params + + $script:psipamSession = $null + } +} +Export-ModuleMember Close-Session \ No newline at end of file