diff --git a/.vscode/tss.code-snippets b/.vscode/tss.code-snippets index 7f52f5ea..813f4750 100644 --- a/.vscode/tss.code-snippets +++ b/.vscode/tss.code-snippets @@ -955,6 +955,12 @@ " [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]", " public Thycotic.PowerShell.Authentication.Session TssSession {get; set;}", " }", + "", + "", + " protected override void ProcessRecord()", + " {", + " base.ProcessRecord();", + " }", "}" ], "description": "cmdlet base" diff --git a/src/Thycotic.SecretServer/cmdlets/private/CompareTssVersionCmdlet.cs b/src/Thycotic.SecretServer/cmdlets/private/CompareTssVersionCmdlet.cs new file mode 100644 index 00000000..806f0bc5 --- /dev/null +++ b/src/Thycotic.SecretServer/cmdlets/private/CompareTssVersionCmdlet.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Management.Automation.Runspaces; + +namespace Thycotic.SecretServer.Cmdlets +{ + /// + /// Comparing Secret Server version to supported version for a given command + /// Comparing Secret Server version to supported version for a given command + /// + [Cmdlet(VerbsData.Compare, "TssVersion")] + public class CompareVersionCmdlet : PSCmdlet + { + /// + ///TssSession object created by New-TssSession for authentication + /// + [Parameter(Mandatory = true, Position = 0)] + public Thycotic.PowerShell.Authentication.Session TssSession {get; set;} + + /// + ///Minimum supported version for the command + /// + [Parameter(Mandatory = true, Position = 1)] + public Version MinimumSupported { get; set; } + + /// + ///Invocation from calling command + /// + [Parameter(Mandatory = true, Position = 2)] + public InvocationInfo Invocation { get; set; } + + protected override void ProcessRecord() + { + var ignoreVersion = SessionState.PSVariable.GetValue("ignoreVersion"); + var tssIgnoreVersionCheck = SessionState.PSVariable.GetValue("tss_ignoreversioncheck"); + if (!Convert.ToBoolean(ignoreVersion) || !Convert.ToBoolean(tssIgnoreVersionCheck)) + { + string sourceCommand = Invocation.MyCommand.ToString(); + var currentVersion = new Version(TssSession.SecretServerVersion.ToString()); + var result = currentVersion.CompareTo(MinimumSupported); + + if (result < 0) + { + WriteVerbose("[" + sourceCommand + "]: Detected version, [" + currentVersion + "], lower than command's supported version of [" + MinimumSupported + "]."); + return; + } + } + } + } +} \ No newline at end of file diff --git a/src/functions/configurations/Disable-TssUnlimitedAdmin.ps1 b/src/functions/configurations/Disable-TssUnlimitedAdmin.ps1 index 9c5b7f12..ec2f3b3b 100644 --- a/src/functions/configurations/Disable-TssUnlimitedAdmin.ps1 +++ b/src/functions/configurations/Disable-TssUnlimitedAdmin.ps1 @@ -41,7 +41,7 @@ function Disable-TssUnlimitedAdmin { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'unlimited-admin' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'PATCH' diff --git a/src/functions/configurations/Enable-TssUnlimitedAdmin.ps1 b/src/functions/configurations/Enable-TssUnlimitedAdmin.ps1 index 8d4c4067..125d0302 100644 --- a/src/functions/configurations/Enable-TssUnlimitedAdmin.ps1 +++ b/src/functions/configurations/Enable-TssUnlimitedAdmin.ps1 @@ -41,7 +41,7 @@ function Enable-TssUnlimitedAdmin { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'unlimited-admin' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'PATCH' diff --git a/src/functions/configurations/Export-TssAutoExportStorageItem.ps1 b/src/functions/configurations/Export-TssAutoExportStorageItem.ps1 index 60a4cb46..2778ba29 100644 --- a/src/functions/configurations/Export-TssAutoExportStorageItem.ps1 +++ b/src/functions/configurations/Export-TssAutoExportStorageItem.ps1 @@ -58,7 +58,7 @@ function Export-TssAutoExportStorageItem { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'auto-export-storage', 'item', $Id -join '/' $itemFilename = $Filename + '.zip' $outFile = [System.IO.Path]::Combine($Output, $itemFilename) diff --git a/src/functions/configurations/Get-TssConfiguration.ps1 b/src/functions/configurations/Get-TssConfiguration.ps1 index cca546e5..56ec0966 100644 --- a/src/functions/configurations/Get-TssConfiguration.ps1 +++ b/src/functions/configurations/Get-TssConfiguration.ps1 @@ -42,7 +42,7 @@ function Get-TssConfiguration { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000032' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000032' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'general' -join '/' $uriParams = @() diff --git a/src/functions/configurations/Get-TssConfigurationAutoExport.ps1 b/src/functions/configurations/Get-TssConfigurationAutoExport.ps1 index 396f6631..62479a8c 100644 --- a/src/functions/configurations/Get-TssConfigurationAutoExport.ps1 +++ b/src/functions/configurations/Get-TssConfigurationAutoExport.ps1 @@ -36,7 +36,7 @@ function Get-TssConfigurationAutoExport { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'configuration', 'auto-export' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/configurations/Get-TssConfigurationBackup.ps1 b/src/functions/configurations/Get-TssConfigurationBackup.ps1 index 2439790b..799b09f0 100644 --- a/src/functions/configurations/Get-TssConfigurationBackup.ps1 +++ b/src/functions/configurations/Get-TssConfigurationBackup.ps1 @@ -36,7 +36,7 @@ function Get-TssConfigurationBackup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'backup' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/configurations/Get-TssConfigurationLocalUserPassword.ps1 b/src/functions/configurations/Get-TssConfigurationLocalUserPassword.ps1 index 4a158871..47484d7b 100644 --- a/src/functions/configurations/Get-TssConfigurationLocalUserPassword.ps1 +++ b/src/functions/configurations/Get-TssConfigurationLocalUserPassword.ps1 @@ -36,7 +36,7 @@ function Get-TssConfigurationLocalUserPassword { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'local-user-passwords' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/configurations/Get-TssConfigurationLogin.ps1 b/src/functions/configurations/Get-TssConfigurationLogin.ps1 index ecd9c4c0..a8e41094 100644 --- a/src/functions/configurations/Get-TssConfigurationLogin.ps1 +++ b/src/functions/configurations/Get-TssConfigurationLogin.ps1 @@ -36,7 +36,7 @@ function Get-TssConfigurationLogin { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'login' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/configurations/Get-TssConfigurationRpc.ps1 b/src/functions/configurations/Get-TssConfigurationRpc.ps1 index 20e2c6b2..708aae6a 100644 --- a/src/functions/configurations/Get-TssConfigurationRpc.ps1 +++ b/src/functions/configurations/Get-TssConfigurationRpc.ps1 @@ -36,7 +36,7 @@ function Get-TssConfigurationRpc { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'rpc' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/configurations/Get-TssConfigurationSaml.ps1 b/src/functions/configurations/Get-TssConfigurationSaml.ps1 index 4444ad46..a62dce7b 100644 --- a/src/functions/configurations/Get-TssConfigurationSaml.ps1 +++ b/src/functions/configurations/Get-TssConfigurationSaml.ps1 @@ -36,7 +36,7 @@ function Get-TssConfigurationSaml { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'saml' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/configurations/Get-TssConfigurationSearchIndex.ps1 b/src/functions/configurations/Get-TssConfigurationSearchIndex.ps1 index 9b1b8679..a5d3b257 100644 --- a/src/functions/configurations/Get-TssConfigurationSearchIndex.ps1 +++ b/src/functions/configurations/Get-TssConfigurationSearchIndex.ps1 @@ -36,7 +36,7 @@ function Get-TssConfigurationSearchIndex { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'secret-search-indexer' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/configurations/Get-TssConfigurationSecurity.ps1 b/src/functions/configurations/Get-TssConfigurationSecurity.ps1 index e905ea38..c2dd2bbf 100644 --- a/src/functions/configurations/Get-TssConfigurationSecurity.ps1 +++ b/src/functions/configurations/Get-TssConfigurationSecurity.ps1 @@ -36,7 +36,7 @@ function Get-TssConfigurationSecurity { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'security' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/configurations/Get-TssConfigurationSiteConnector.ps1 b/src/functions/configurations/Get-TssConfigurationSiteConnector.ps1 index a69f0aaf..03799046 100644 --- a/src/functions/configurations/Get-TssConfigurationSiteConnector.ps1 +++ b/src/functions/configurations/Get-TssConfigurationSiteConnector.ps1 @@ -40,7 +40,7 @@ function Get-TssConfigurationSiteConnector { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'configuration', 'site-connector' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/configurations/Search-TssAutoExportStorage.ps1 b/src/functions/configurations/Search-TssAutoExportStorage.ps1 index 04e63355..1bcd3eaa 100644 --- a/src/functions/configurations/Search-TssAutoExportStorage.ps1 +++ b/src/functions/configurations/Search-TssAutoExportStorage.ps1 @@ -36,7 +36,7 @@ function Search-TssAutoExportStorage { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'auto-export-storage' -join '/' $uri = $uri, "sortBy[0].direction=desc&sortBy[0].name=Id&take=$($TssSession.Take)" -join '?' $invokeParams.Uri = $uri diff --git a/src/functions/configurations/Search-TssConfigurationAudit.ps1 b/src/functions/configurations/Search-TssConfigurationAudit.ps1 index d452e5a5..673291f3 100644 --- a/src/functions/configurations/Search-TssConfigurationAudit.ps1 +++ b/src/functions/configurations/Search-TssConfigurationAudit.ps1 @@ -51,7 +51,7 @@ function Search-TssConfigurationAudit { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration','audit' -join '/' $uri = $uri, "sortBy[0].direction=desc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' $invokeParams.Method = 'GET' diff --git a/src/functions/configurations/Search-TssConfigurationBackupLog.ps1 b/src/functions/configurations/Search-TssConfigurationBackupLog.ps1 index 35c8fccc..0c0a1b52 100644 --- a/src/functions/configurations/Search-TssConfigurationBackupLog.ps1 +++ b/src/functions/configurations/Search-TssConfigurationBackupLog.ps1 @@ -40,7 +40,7 @@ function Search-TssConfigurationBackupLog { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation $uri = ($TssSession.ApiUrl -replace 'v1','v2'), 'configuration', 'backup-logs' -join '/' $uri = $uri, "sortBy[0].direction=desc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' $invokeParams.Uri = $uri diff --git a/src/functions/configurations/Set-TssConfigurationAutoExport.ps1 b/src/functions/configurations/Set-TssConfigurationAutoExport.ps1 index fce965f4..baba2236 100644 --- a/src/functions/configurations/Set-TssConfigurationAutoExport.ps1 +++ b/src/functions/configurations/Set-TssConfigurationAutoExport.ps1 @@ -79,7 +79,7 @@ function Set-TssConfigurationAutoExport { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.0005' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.0005' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'auto-export' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'PATCH' diff --git a/src/functions/configurations/Set-TssConfigurationGeneral.ps1 b/src/functions/configurations/Set-TssConfigurationGeneral.ps1 index 2e1a6aec..7b186e6f 100644 --- a/src/functions/configurations/Set-TssConfigurationGeneral.ps1 +++ b/src/functions/configurations/Set-TssConfigurationGeneral.ps1 @@ -181,7 +181,7 @@ function Set-TssConfigurationGeneral { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'general' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'PATCH' diff --git a/src/functions/configurations/Set-TssConfigurationLocalUserPassword.ps1 b/src/functions/configurations/Set-TssConfigurationLocalUserPassword.ps1 index 18ed69c6..b15da4b3 100644 --- a/src/functions/configurations/Set-TssConfigurationLocalUserPassword.ps1 +++ b/src/functions/configurations/Set-TssConfigurationLocalUserPassword.ps1 @@ -99,7 +99,7 @@ function Set-TssConfigurationLocalUserPassword { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'local-user-passwords' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'PATCH' diff --git a/src/functions/configurations/Set-TssConfigurationLogin.ps1 b/src/functions/configurations/Set-TssConfigurationLogin.ps1 index 0ddddd17..5b01e038 100644 --- a/src/functions/configurations/Set-TssConfigurationLogin.ps1 +++ b/src/functions/configurations/Set-TssConfigurationLogin.ps1 @@ -79,7 +79,7 @@ function Set-TssConfigurationLogin { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'login' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'PATCH' diff --git a/src/functions/configurations/Set-TssConfigurationRpc.ps1 b/src/functions/configurations/Set-TssConfigurationRpc.ps1 index 6d15dbb8..6c649e34 100644 --- a/src/functions/configurations/Set-TssConfigurationRpc.ps1 +++ b/src/functions/configurations/Set-TssConfigurationRpc.ps1 @@ -70,7 +70,7 @@ function Set-TssConfigurationRpc { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'rpc' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'PATCH' diff --git a/src/functions/configurations/Set-TssConfigurationSecurity.ps1 b/src/functions/configurations/Set-TssConfigurationSecurity.ps1 index f93164ca..f03cd32e 100644 --- a/src/functions/configurations/Set-TssConfigurationSecurity.ps1 +++ b/src/functions/configurations/Set-TssConfigurationSecurity.ps1 @@ -93,7 +93,7 @@ function Set-TssConfigurationSecurity { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'security' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'PATCH' diff --git a/src/functions/configurations/Start-TssConfigurationBackup.ps1 b/src/functions/configurations/Start-TssConfigurationBackup.ps1 index 42a545c8..e617add9 100644 --- a/src/functions/configurations/Start-TssConfigurationBackup.ps1 +++ b/src/functions/configurations/Start-TssConfigurationBackup.ps1 @@ -35,7 +35,7 @@ function Start-TssConfigurationBackup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'backup', 'run-now' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'POST' diff --git a/src/functions/configurations/Start-TssConfigurationSearchIndex.ps1 b/src/functions/configurations/Start-TssConfigurationSearchIndex.ps1 index f28374aa..d757188d 100644 --- a/src/functions/configurations/Start-TssConfigurationSearchIndex.ps1 +++ b/src/functions/configurations/Start-TssConfigurationSearchIndex.ps1 @@ -35,7 +35,7 @@ function Start-TssConfigurationSearchIndex { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'configuration', 'secret-search-indexer', 'rebuild-index' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'POST' diff --git a/src/functions/diagnostics/Search-TssSystemLog.ps1 b/src/functions/diagnostics/Search-TssSystemLog.ps1 index de1ab4e5..6a37ddc3 100644 --- a/src/functions/diagnostics/Search-TssSystemLog.ps1 +++ b/src/functions/diagnostics/Search-TssSystemLog.ps1 @@ -54,7 +54,7 @@ function Search-TssSystemLog { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000000' $PSCmdlet.MyInvocation $uri = ($TssSession.ApiUrl -replace 'v1','v2'), 'diagnostics', 'system-logs' -join '/' $uri = $uri, "sortBy[0].direction=desc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' $invokeParams.Method = 'GET' diff --git a/src/functions/directory-services/Add-TssDirectoryServiceGroup.ps1 b/src/functions/directory-services/Add-TssDirectoryServiceGroup.ps1 index e41380c6..35c94891 100644 --- a/src/functions/directory-services/Add-TssDirectoryServiceGroup.ps1 +++ b/src/functions/directory-services/Add-TssDirectoryServiceGroup.ps1 @@ -58,7 +58,7 @@ function Add-TssDirectoryServiceGroup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'directory-services', 'domains', $DomainId, 'group' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'POST' diff --git a/src/functions/directory-services/Get-TssDirectoryServiceDomain.ps1 b/src/functions/directory-services/Get-TssDirectoryServiceDomain.ps1 index c2802d39..f3293052 100644 --- a/src/functions/directory-services/Get-TssDirectoryServiceDomain.ps1 +++ b/src/functions/directory-services/Get-TssDirectoryServiceDomain.ps1 @@ -48,7 +48,7 @@ function Get-TssDirectoryServiceDomain { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation foreach ($domain in $Id) { $uri = $TssSession.ApiUrl, 'directory-services', 'domains', $domain -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/directory-services/Get-TssDirectoryServiceSyncStatus.ps1 b/src/functions/directory-services/Get-TssDirectoryServiceSyncStatus.ps1 index fa0f3c78..6d5efe4a 100644 --- a/src/functions/directory-services/Get-TssDirectoryServiceSyncStatus.ps1 +++ b/src/functions/directory-services/Get-TssDirectoryServiceSyncStatus.ps1 @@ -36,7 +36,7 @@ function Get-TssDirectoryServiceSyncStatus { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'directory-services', 'synchronization' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/directory-services/New-TssDirectoryService.ps1 b/src/functions/directory-services/New-TssDirectoryService.ps1 index b79d261f..338d013a 100644 --- a/src/functions/directory-services/New-TssDirectoryService.ps1 +++ b/src/functions/directory-services/New-TssDirectoryService.ps1 @@ -133,7 +133,7 @@ function New-TssDirectoryService { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'directory-services', 'domains' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/directory-services/Remove-TssDirectoryServiceGroup.ps1 b/src/functions/directory-services/Remove-TssDirectoryServiceGroup.ps1 index 49d869a0..824b64c8 100644 --- a/src/functions/directory-services/Remove-TssDirectoryServiceGroup.ps1 +++ b/src/functions/directory-services/Remove-TssDirectoryServiceGroup.ps1 @@ -52,7 +52,7 @@ function Remove-TssDirectoryServiceGroup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation foreach ($group in $GroupId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'directory-services', 'domains', $DomainId, 'group', $group -join '/' diff --git a/src/functions/directory-services/Search-TssDirectoryServiceDomain.ps1 b/src/functions/directory-services/Search-TssDirectoryServiceDomain.ps1 index 613caa8e..087df24c 100644 --- a/src/functions/directory-services/Search-TssDirectoryServiceDomain.ps1 +++ b/src/functions/directory-services/Search-TssDirectoryServiceDomain.ps1 @@ -49,7 +49,7 @@ function Search-TssDirectoryServiceDomain { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'directory-services', 'domains' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)&filter.includeInactive=$([boolean]$IncludeInactive)" -join '?' diff --git a/src/functions/directory-services/Search-TssDirectoryServiceGroup.ps1 b/src/functions/directory-services/Search-TssDirectoryServiceGroup.ps1 index cfbbdd76..c2f2faa6 100644 --- a/src/functions/directory-services/Search-TssDirectoryServiceGroup.ps1 +++ b/src/functions/directory-services/Search-TssDirectoryServiceGroup.ps1 @@ -52,7 +52,7 @@ function Search-TssDirectoryServiceGroup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'directory-services', 'domains', $DomainId, 'groups', 'search-directory' -join '/' $uri = $uri, "searchText=$SearchText" -join '?' $invokeParams.Uri = $uri diff --git a/src/functions/directory-services/Search-TssDirectoryServiceGroupMember.ps1 b/src/functions/directory-services/Search-TssDirectoryServiceGroupMember.ps1 index 8b34ac20..1b8553a7 100644 --- a/src/functions/directory-services/Search-TssDirectoryServiceGroupMember.ps1 +++ b/src/functions/directory-services/Search-TssDirectoryServiceGroupMember.ps1 @@ -47,7 +47,7 @@ function Search-TssDirectoryServiceGroupMember { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'directory-services', 'domains', $DomainId, 'members' -join '/' $uri = $uri, "groupName=$GroupName" -join '?' $invokeParams.Uri = $uri diff --git a/src/functions/directory-services/Start-TssDirectoryServiceSync.ps1 b/src/functions/directory-services/Start-TssDirectoryServiceSync.ps1 index ef3bc8b8..274a532f 100644 --- a/src/functions/directory-services/Start-TssDirectoryServiceSync.ps1 +++ b/src/functions/directory-services/Start-TssDirectoryServiceSync.ps1 @@ -35,7 +35,7 @@ function Start-TssDirectoryServiceSync { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'directory-services', 'synchronization-now' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'POST' diff --git a/src/functions/discovery/Get-TssDiscoveryStatus.ps1 b/src/functions/discovery/Get-TssDiscoveryStatus.ps1 index f2c7897f..78903500 100644 --- a/src/functions/discovery/Get-TssDiscoveryStatus.ps1 +++ b/src/functions/discovery/Get-TssDiscoveryStatus.ps1 @@ -36,7 +36,7 @@ function Get-TssDiscoveryStatus { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'discovery', 'status' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/discovery/Start-TssDiscovery.ps1 b/src/functions/discovery/Start-TssDiscovery.ps1 index 89a39227..3299cccc 100644 --- a/src/functions/discovery/Start-TssDiscovery.ps1 +++ b/src/functions/discovery/Start-TssDiscovery.ps1 @@ -47,7 +47,7 @@ function Start-TssDiscovery { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'discovery', 'run' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'POST' diff --git a/src/functions/distributed-engines/Search-TssDistributedEngineSite.ps1 b/src/functions/distributed-engines/Search-TssDistributedEngineSite.ps1 index 7fa08b4e..a380c928 100644 --- a/src/functions/distributed-engines/Search-TssDistributedEngineSite.ps1 +++ b/src/functions/distributed-engines/Search-TssDistributedEngineSite.ps1 @@ -61,7 +61,7 @@ function Search-TssDistributedEngineSite { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000032' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000032' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'distributed-engine', 'sites' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/event-pipeline-policy/Add-TssEventPipeline.ps1 b/src/functions/event-pipeline-policy/Add-TssEventPipeline.ps1 index d1b46cfa..193db3a1 100644 --- a/src/functions/event-pipeline-policy/Add-TssEventPipeline.ps1 +++ b/src/functions/event-pipeline-policy/Add-TssEventPipeline.ps1 @@ -47,7 +47,7 @@ function Add-TssEventPipeline { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($pipeline in $PipelineId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'event-pipeline-policy', $PolicyId -join '/' diff --git a/src/functions/event-pipeline-policy/Disable-TssEventPipelinePolicy.ps1 b/src/functions/event-pipeline-policy/Disable-TssEventPipelinePolicy.ps1 index a5596cc1..c853d279 100644 --- a/src/functions/event-pipeline-policy/Disable-TssEventPipelinePolicy.ps1 +++ b/src/functions/event-pipeline-policy/Disable-TssEventPipelinePolicy.ps1 @@ -41,7 +41,7 @@ function Disable-TssEventPipelinePolicy { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($policy in $Id) { $uri = $TssSession.ApiUrl, 'event-pipeline-policy', $policy, 'activate' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/event-pipeline-policy/Enable-TssEventPipelinePolicy.ps1 b/src/functions/event-pipeline-policy/Enable-TssEventPipelinePolicy.ps1 index 069cc680..e165c2ce 100644 --- a/src/functions/event-pipeline-policy/Enable-TssEventPipelinePolicy.ps1 +++ b/src/functions/event-pipeline-policy/Enable-TssEventPipelinePolicy.ps1 @@ -41,7 +41,7 @@ function Enable-TssEventPipelinePolicy { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($policy in $Id) { $uri = $TssSession.ApiUrl, 'event-pipeline-policy', $policy, 'activate' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/event-pipeline-policy/Get-TssEventPipelinePolicy.ps1 b/src/functions/event-pipeline-policy/Get-TssEventPipelinePolicy.ps1 index e98c1f45..9cd65c91 100644 --- a/src/functions/event-pipeline-policy/Get-TssEventPipelinePolicy.ps1 +++ b/src/functions/event-pipeline-policy/Get-TssEventPipelinePolicy.ps1 @@ -42,7 +42,7 @@ function Get-TssEventPipelinePolicy { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($policy in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'event-pipeline-policy', $policy -join '/' diff --git a/src/functions/event-pipeline-policy/Get-TssEventPipelinePolicyActivity.ps1 b/src/functions/event-pipeline-policy/Get-TssEventPipelinePolicyActivity.ps1 index bf402001..a710b5b5 100644 --- a/src/functions/event-pipeline-policy/Get-TssEventPipelinePolicyActivity.ps1 +++ b/src/functions/event-pipeline-policy/Get-TssEventPipelinePolicyActivity.ps1 @@ -54,7 +54,7 @@ function Get-TssEventPipelinePolicyActivity { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'event-pipeline-policy', 'activity' -join '/' $uri = $uri, "eventPipelineId=$PipelineId&eventPipelinePolicyRunId=$RunId" -join '?' diff --git a/src/functions/event-pipeline-policy/Remove-TssEventPipeline.ps1 b/src/functions/event-pipeline-policy/Remove-TssEventPipeline.ps1 index 4ad0ea2a..fab3ce4b 100644 --- a/src/functions/event-pipeline-policy/Remove-TssEventPipeline.ps1 +++ b/src/functions/event-pipeline-policy/Remove-TssEventPipeline.ps1 @@ -47,7 +47,7 @@ function Remove-TssEventPipeline { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($pipeline in $PipelineId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'event-pipeline-policy',$PolicyId, 'pipeline', $pipeline -join '/' diff --git a/src/functions/event-pipeline-policy/Search-TssEventPipelinePolicy.ps1 b/src/functions/event-pipeline-policy/Search-TssEventPipelinePolicy.ps1 index 2c18915c..91fc4aff 100644 --- a/src/functions/event-pipeline-policy/Search-TssEventPipelinePolicy.ps1 +++ b/src/functions/event-pipeline-policy/Search-TssEventPipelinePolicy.ps1 @@ -66,7 +66,7 @@ function Search-TssEventPipelinePolicy { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'event-pipeline-policy', 'list' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/event-pipeline/Disable-TssEventPipeline.ps1 b/src/functions/event-pipeline/Disable-TssEventPipeline.ps1 index 3c46c273..a65ad39f 100644 --- a/src/functions/event-pipeline/Disable-TssEventPipeline.ps1 +++ b/src/functions/event-pipeline/Disable-TssEventPipeline.ps1 @@ -41,7 +41,7 @@ function Disable-TssEventPipeline { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($pipeline in $Id) { $uri = $TssSession.ApiUrl, 'event-pipeline', $pipeline, 'activate' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/event-pipeline/Enable-TssEventPipeline.ps1 b/src/functions/event-pipeline/Enable-TssEventPipeline.ps1 index f6249c74..0c04d68b 100644 --- a/src/functions/event-pipeline/Enable-TssEventPipeline.ps1 +++ b/src/functions/event-pipeline/Enable-TssEventPipeline.ps1 @@ -41,7 +41,7 @@ function Enable-TssEventPipeline { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($pipeline in $Id) { $uri = $TssSession.ApiUrl, 'event-pipeline', $pipeline, 'activate' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/event-pipeline/Get-TssEventPipeline.ps1 b/src/functions/event-pipeline/Get-TssEventPipeline.ps1 index 6a2b9c20..23ac5271 100644 --- a/src/functions/event-pipeline/Get-TssEventPipeline.ps1 +++ b/src/functions/event-pipeline/Get-TssEventPipeline.ps1 @@ -42,7 +42,7 @@ function Get-TssEventPipeline { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($pipeline in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'event-pipeline', $pipeline -join '/' diff --git a/src/functions/event-pipeline/Get-TssEventPipelineRun.ps1 b/src/functions/event-pipeline/Get-TssEventPipelineRun.ps1 index ad68334e..f857fc22 100644 --- a/src/functions/event-pipeline/Get-TssEventPipelineRun.ps1 +++ b/src/functions/event-pipeline/Get-TssEventPipelineRun.ps1 @@ -42,7 +42,7 @@ function Get-TssEventPipelineRun { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($pipeline in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'event-pipeline', 'runs' -join '/' diff --git a/src/functions/event-pipeline/Search-TssEventPipeline.ps1 b/src/functions/event-pipeline/Search-TssEventPipeline.ps1 index ebe71767..ffbd1952 100644 --- a/src/functions/event-pipeline/Search-TssEventPipeline.ps1 +++ b/src/functions/event-pipeline/Search-TssEventPipeline.ps1 @@ -68,7 +68,7 @@ function Search-TssEventPipeline { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'event-pipeline', 'summaries' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/folder-permissions/Get-TssFolderPermission.ps1 b/src/functions/folder-permissions/Get-TssFolderPermission.ps1 index 584184db..87efbc31 100644 --- a/src/functions/folder-permissions/Get-TssFolderPermission.ps1 +++ b/src/functions/folder-permissions/Get-TssFolderPermission.ps1 @@ -48,7 +48,7 @@ function Get-TssFolderPermission { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($folderPermission in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'folder-permissions', $folderPermission -join '/' diff --git a/src/functions/folder-permissions/New-TssFolderPermission.ps1 b/src/functions/folder-permissions/New-TssFolderPermission.ps1 index 147abc95..2ac05c72 100644 --- a/src/functions/folder-permissions/New-TssFolderPermission.ps1 +++ b/src/functions/folder-permissions/New-TssFolderPermission.ps1 @@ -74,7 +74,7 @@ function New-TssFolderPermission { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('UserId') -or $tssNewParams.ContainsKey('GroupId')) { foreach ($folder in $FolderId) { $restResponse = $null diff --git a/src/functions/folder-permissions/Remove-TssFolderPermission.ps1 b/src/functions/folder-permissions/Remove-TssFolderPermission.ps1 index 1d6321ef..99b697be 100644 --- a/src/functions/folder-permissions/Remove-TssFolderPermission.ps1 +++ b/src/functions/folder-permissions/Remove-TssFolderPermission.ps1 @@ -48,7 +48,7 @@ function Remove-TssFolderPermission { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($folderPermission in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'folder-permissions', $folderPermission -join '/' diff --git a/src/functions/folder-permissions/Search-TssFolderPermission.ps1 b/src/functions/folder-permissions/Search-TssFolderPermission.ps1 index a504f1c1..e7234efc 100644 --- a/src/functions/folder-permissions/Search-TssFolderPermission.ps1 +++ b/src/functions/folder-permissions/Search-TssFolderPermission.ps1 @@ -52,7 +52,7 @@ function Search-TssFolderPermission { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('FolderId') -or $tssParams.ContainsKey('GroupId') -or $tssParams.ContainsKey('UserId')) { $restResponse = $null $uri = $TssSession.ApiUrl, 'folder-permissions' -join '/' diff --git a/src/functions/folder-permissions/Update-TssFolderPermission.ps1 b/src/functions/folder-permissions/Update-TssFolderPermission.ps1 index 6080c162..9d56a895 100644 --- a/src/functions/folder-permissions/Update-TssFolderPermission.ps1 +++ b/src/functions/folder-permissions/Update-TssFolderPermission.ps1 @@ -69,7 +69,7 @@ function Update-TssFolderPermission { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($folderPermission in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'folder-permissions', $folderPermission -join '/' diff --git a/src/functions/folders/Add-TssFolderPermission.ps1 b/src/functions/folders/Add-TssFolderPermission.ps1 index 93cc9472..60b88feb 100644 --- a/src/functions/folders/Add-TssFolderPermission.ps1 +++ b/src/functions/folders/Add-TssFolderPermission.ps1 @@ -82,7 +82,7 @@ function Add-TssFolderPermission { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('Username')) { $users = Search-TssUser -TssSession $TssSession diff --git a/src/functions/folders/Find-TssFolder.ps1 b/src/functions/folders/Find-TssFolder.ps1 index b2fcbe39..b9b0d7dc 100644 --- a/src/functions/folders/Find-TssFolder.ps1 +++ b/src/functions/folders/Find-TssFolder.ps1 @@ -56,7 +56,7 @@ function Find-TssFolder { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'folders/lookup' -join '/' diff --git a/src/functions/folders/Get-TssFolder.ps1 b/src/functions/folders/Get-TssFolder.ps1 index 5ce0e556..774144de 100644 --- a/src/functions/folders/Get-TssFolder.ps1 +++ b/src/functions/folders/Get-TssFolder.ps1 @@ -86,7 +86,7 @@ function Get-TssFolder { process { if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { if ($tssParams.ContainsKey('FolderPath')) { - . $CheckVersion $TssSession '11.0.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000000' $PSCmdlet.MyInvocation foreach ($path in $FolderPath) { $uri = $TssSession.ApiUrl, 'folders', 0 -join '/' $uri = $uri, "folderPath=$path&getAllChildren=$([boolean]$GetChildren)&includeAssociatedTemplates=$([boolean]$IncludeTemplate)" -join '?' @@ -110,7 +110,7 @@ function Get-TssFolder { } } if ($tssParams.ContainsKey('Id') -or $Id) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($folder in $Id) { $uri = $TssSession.ApiUrl, 'folders', $folder -join '/' $uri = $uri, "getAllChildren=$([boolean]$GetChildren)&includeAssociatedTemplates=$([boolean]$IncludeTemplate)" -join '?' diff --git a/src/functions/folders/Get-TssFolderAudit.ps1 b/src/functions/folders/Get-TssFolderAudit.ps1 index c839121c..d94090ea 100644 --- a/src/functions/folders/Get-TssFolderAudit.ps1 +++ b/src/functions/folders/Get-TssFolderAudit.ps1 @@ -43,7 +43,7 @@ function Get-TssFolderAudit { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($folder in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'folders', $folder, 'audit' -join '/' diff --git a/src/functions/folders/Get-TssFolderState.ps1 b/src/functions/folders/Get-TssFolderState.ps1 index 32145090..5c37fa22 100644 --- a/src/functions/folders/Get-TssFolderState.ps1 +++ b/src/functions/folders/Get-TssFolderState.ps1 @@ -52,7 +52,7 @@ function Get-TssFolderState { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($folder in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'folder-details', $folder -join '/' diff --git a/src/functions/folders/New-TssFolder.ps1 b/src/functions/folders/New-TssFolder.ps1 index 354b71e8..c2eb4a97 100644 --- a/src/functions/folders/New-TssFolder.ps1 +++ b/src/functions/folders/New-TssFolder.ps1 @@ -79,7 +79,7 @@ function New-TssFolder { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'folders' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/folders/Remove-TssFolder.ps1 b/src/functions/folders/Remove-TssFolder.ps1 index aefe0eaf..82c21f29 100644 --- a/src/functions/folders/Remove-TssFolder.ps1 +++ b/src/functions/folders/Remove-TssFolder.ps1 @@ -43,7 +43,7 @@ function Remove-TssFolder { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($folder in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'folders', $folder -join '/' diff --git a/src/functions/folders/Remove-TssFolderTemplate.ps1 b/src/functions/folders/Remove-TssFolderTemplate.ps1 index dc0e417e..09b16248 100644 --- a/src/functions/folders/Remove-TssFolderTemplate.ps1 +++ b/src/functions/folders/Remove-TssFolderTemplate.ps1 @@ -48,7 +48,7 @@ function Remove-TssFolderTemplate { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($template in $TemplateId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'folders', $Id, 'templates', $template -join '/' diff --git a/src/functions/folders/Search-TssFolder.ps1 b/src/functions/folders/Search-TssFolder.ps1 index 84627130..58885f12 100644 --- a/src/functions/folders/Search-TssFolder.ps1 +++ b/src/functions/folders/Search-TssFolder.ps1 @@ -55,7 +55,7 @@ function Search-TssFolder { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'folders' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)&filter.folderTypeId=1" -join '?' diff --git a/src/functions/folders/Set-TssFolder.ps1 b/src/functions/folders/Set-TssFolder.ps1 index dfd8d0ce..1afb593b 100644 --- a/src/functions/folders/Set-TssFolder.ps1 +++ b/src/functions/folders/Set-TssFolder.ps1 @@ -68,7 +68,7 @@ function Set-TssFolder { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setFolderParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($folder in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'folder', $folder -join '/' diff --git a/src/functions/folders/Update-TssFolder.ps1 b/src/functions/folders/Update-TssFolder.ps1 index 7b4c029c..41503876 100644 --- a/src/functions/folders/Update-TssFolder.ps1 +++ b/src/functions/folders/Update-TssFolder.ps1 @@ -43,7 +43,7 @@ function Update-TssFolder { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($updateParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $folderId = $Folder.Id $restResponse = $null $uri = $TssSession.ApiUrl, 'folders', $folderId -join '/' diff --git a/src/functions/groups/Add-TssGroupMember.ps1 b/src/functions/groups/Add-TssGroupMember.ps1 index faccd89f..eceeca9c 100644 --- a/src/functions/groups/Add-TssGroupMember.ps1 +++ b/src/functions/groups/Add-TssGroupMember.ps1 @@ -47,7 +47,7 @@ function Add-TssGroupMember { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $UserId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'groups', $Id, 'users' -join '/' diff --git a/src/functions/groups/Find-TssGroup.ps1 b/src/functions/groups/Find-TssGroup.ps1 index 9846e095..a36ed6ec 100644 --- a/src/functions/groups/Find-TssGroup.ps1 +++ b/src/functions/groups/Find-TssGroup.ps1 @@ -62,7 +62,7 @@ function Find-TssGroup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'groups', 'lookup' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/groups/Get-TssGroup.ps1 b/src/functions/groups/Get-TssGroup.ps1 index 8d42aa8d..9a017d0a 100644 --- a/src/functions/groups/Get-TssGroup.ps1 +++ b/src/functions/groups/Get-TssGroup.ps1 @@ -42,7 +42,7 @@ function Get-TssGroup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($group in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'groups', $group -join '/' diff --git a/src/functions/groups/Get-TssGroupMember.ps1 b/src/functions/groups/Get-TssGroupMember.ps1 index 665a5ca5..fd577ea4 100644 --- a/src/functions/groups/Get-TssGroupMember.ps1 +++ b/src/functions/groups/Get-TssGroupMember.ps1 @@ -55,7 +55,7 @@ function Get-TssGroupMember { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($group in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'groups', $group, 'users' -join '/' diff --git a/src/functions/groups/Get-TssGroupRole.ps1 b/src/functions/groups/Get-TssGroupRole.ps1 index a3dcd376..b16de5ea 100644 --- a/src/functions/groups/Get-TssGroupRole.ps1 +++ b/src/functions/groups/Get-TssGroupRole.ps1 @@ -42,7 +42,7 @@ function Get-TssGroupRole { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($group in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'groups', $group, 'roles' -join '/' diff --git a/src/functions/groups/Get-TssGroupUser.ps1 b/src/functions/groups/Get-TssGroupUser.ps1 index 2929241a..08f90d60 100644 --- a/src/functions/groups/Get-TssGroupUser.ps1 +++ b/src/functions/groups/Get-TssGroupUser.ps1 @@ -47,7 +47,7 @@ function Get-TssGroupUser { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'groups', $Id, 'users', $UserId -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/groups/New-TssGroup.ps1 b/src/functions/groups/New-TssGroup.ps1 index c9ae63f2..58063fb0 100644 --- a/src/functions/groups/New-TssGroup.ps1 +++ b/src/functions/groups/New-TssGroup.ps1 @@ -62,7 +62,7 @@ function New-TssGroup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'groups' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/groups/Remove-TssGroupMember.ps1 b/src/functions/groups/Remove-TssGroupMember.ps1 index f38b6a09..0b12d0e5 100644 --- a/src/functions/groups/Remove-TssGroupMember.ps1 +++ b/src/functions/groups/Remove-TssGroupMember.ps1 @@ -47,7 +47,7 @@ function Remove-TssGroupMember { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'groups', $Id, 'users', $UserId -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/groups/Search-TssGroup.ps1 b/src/functions/groups/Search-TssGroup.ps1 index e2050c16..8957b718 100644 --- a/src/functions/groups/Search-TssGroup.ps1 +++ b/src/functions/groups/Search-TssGroup.ps1 @@ -53,7 +53,7 @@ function Search-TssGroup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'groups' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/groups/Update-TssGroupMember.ps1 b/src/functions/groups/Update-TssGroupMember.ps1 index 017b2393..a953c3c9 100644 --- a/src/functions/groups/Update-TssGroupMember.ps1 +++ b/src/functions/groups/Update-TssGroupMember.ps1 @@ -46,7 +46,7 @@ function Update-TssGroupMember { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'groups', $Id, 'users' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/ipaddress-restrictions/Remove-TssIpRestriction.ps1 b/src/functions/ipaddress-restrictions/Remove-TssIpRestriction.ps1 index 41a86083..20655cb3 100644 --- a/src/functions/ipaddress-restrictions/Remove-TssIpRestriction.ps1 +++ b/src/functions/ipaddress-restrictions/Remove-TssIpRestriction.ps1 @@ -42,7 +42,7 @@ function Remove-TssIpRestriction { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation foreach ($ipRestriction in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'ipaddress-restrictions', $ipRestriction -join '/' diff --git a/src/functions/ipaddress-restrictions/Search-TssIpRestriction.ps1 b/src/functions/ipaddress-restrictions/Search-TssIpRestriction.ps1 index 75738685..064ed345 100644 --- a/src/functions/ipaddress-restrictions/Search-TssIpRestriction.ps1 +++ b/src/functions/ipaddress-restrictions/Search-TssIpRestriction.ps1 @@ -40,7 +40,7 @@ function Search-TssIpRestriction { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'ipaddress-restrictions' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' $invokeParams.Method = 'GET' diff --git a/src/functions/ipaddress-restrictions/Search-TssIpRestrictionGroup.ps1 b/src/functions/ipaddress-restrictions/Search-TssIpRestrictionGroup.ps1 index 77f8f66c..d3f727b4 100644 --- a/src/functions/ipaddress-restrictions/Search-TssIpRestrictionGroup.ps1 +++ b/src/functions/ipaddress-restrictions/Search-TssIpRestrictionGroup.ps1 @@ -54,7 +54,7 @@ function Search-TssIpRestrictionGroup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('IpAddressRestrictionId')) { $uri = $TssSession.ApiUrl, 'ipaddress-restrictions', $IpAddressRestrictionId, 'groups' -join '/' } diff --git a/src/functions/metadata/Get-TssMetadataField.ps1 b/src/functions/metadata/Get-TssMetadataField.ps1 index e1021f9c..f60bf07d 100644 --- a/src/functions/metadata/Get-TssMetadataField.ps1 +++ b/src/functions/metadata/Get-TssMetadataField.ps1 @@ -36,7 +36,7 @@ function Get-TssMetadataField { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'metadata', 'fields' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/metadata/New-TssMetadataField.ps1 b/src/functions/metadata/New-TssMetadataField.ps1 index e97e65f1..f3be6657 100644 --- a/src/functions/metadata/New-TssMetadataField.ps1 +++ b/src/functions/metadata/New-TssMetadataField.ps1 @@ -118,7 +118,7 @@ function New-TssMetadataField { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'metadata', $ItemType, $ItemId -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'POST' diff --git a/src/functions/metadata/Remove-TssMetadata.ps1 b/src/functions/metadata/Remove-TssMetadata.ps1 index 018946d7..123b9693 100644 --- a/src/functions/metadata/Remove-TssMetadata.ps1 +++ b/src/functions/metadata/Remove-TssMetadata.ps1 @@ -53,7 +53,7 @@ function Remove-TssMetadata { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'metadata', $ItemType, $ItemId, $ItemDataId -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/metadata/Search-TssMetadata.ps1 b/src/functions/metadata/Search-TssMetadata.ps1 index b5894a8b..d09dda18 100644 --- a/src/functions/metadata/Search-TssMetadata.ps1 +++ b/src/functions/metadata/Search-TssMetadata.ps1 @@ -58,7 +58,7 @@ function Search-TssMetadata { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'metadata' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/metadata/Search-TssMetadataHistory.ps1 b/src/functions/metadata/Search-TssMetadataHistory.ps1 index b741a008..1acfb7e9 100644 --- a/src/functions/metadata/Search-TssMetadataHistory.ps1 +++ b/src/functions/metadata/Search-TssMetadataHistory.ps1 @@ -64,7 +64,7 @@ function Search-TssMetadataHistory { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'metadata', 'history' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' $invokeParams.Method = 'GET' diff --git a/src/functions/metadata/Search-TssMetadataSection.ps1 b/src/functions/metadata/Search-TssMetadataSection.ps1 index 48ffbb31..b5093e72 100644 --- a/src/functions/metadata/Search-TssMetadataSection.ps1 +++ b/src/functions/metadata/Search-TssMetadataSection.ps1 @@ -57,7 +57,7 @@ function Search-TssMetadataSection { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'metadata', 'field-sections' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' $invokeParams.Method = 'GET' diff --git a/src/functions/metadata/Update-TssMetadataField.ps1 b/src/functions/metadata/Update-TssMetadataField.ps1 index f9b617a1..09b2467c 100644 --- a/src/functions/metadata/Update-TssMetadataField.ps1 +++ b/src/functions/metadata/Update-TssMetadataField.ps1 @@ -71,7 +71,7 @@ function Update-TssMetadataField { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($updateParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'metadata', $ItemType, $ItemId -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'PATCH' diff --git a/src/functions/metadata/Update-TssMetadataSection.ps1 b/src/functions/metadata/Update-TssMetadataSection.ps1 index 9c31a324..0ee5b95d 100644 --- a/src/functions/metadata/Update-TssMetadataSection.ps1 +++ b/src/functions/metadata/Update-TssMetadataSection.ps1 @@ -78,7 +78,7 @@ function Update-TssMetadataSection { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($updateParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'metadata', 'field-sections', $SectionId -join '/' if ($updateParams.ContainsKey('ItemId') -and $updateParams.ContainsKey('ItemType')) { $uri = $uri, "itemId=$ItemId&itemType=$ItemType" -join '?' diff --git a/src/functions/reports/Export-TssReport.ps1 b/src/functions/reports/Export-TssReport.ps1 index 0e588420..f56ebb76 100644 --- a/src/functions/reports/Export-TssReport.ps1 +++ b/src/functions/reports/Export-TssReport.ps1 @@ -70,7 +70,7 @@ function Export-TssReport { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'reports', 'export' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'POST' diff --git a/src/functions/reports/Find-TssReport.ps1 b/src/functions/reports/Find-TssReport.ps1 index 3b5c7449..060ac6a6 100644 --- a/src/functions/reports/Find-TssReport.ps1 +++ b/src/functions/reports/Find-TssReport.ps1 @@ -59,7 +59,7 @@ function Find-TssReport { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'reports', 'lookup' -join '/' $uri = $uri, "&take=$($TssSession.Take)" -join '?' $invokeParams.Method = 'GET' diff --git a/src/functions/reports/Get-TssReport.ps1 b/src/functions/reports/Get-TssReport.ps1 index f13c8bfe..fe87036d 100644 --- a/src/functions/reports/Get-TssReport.ps1 +++ b/src/functions/reports/Get-TssReport.ps1 @@ -43,7 +43,7 @@ function Get-TssReport { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($report in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'reports', $report -join '/' diff --git a/src/functions/reports/Get-TssReportCategory.ps1 b/src/functions/reports/Get-TssReportCategory.ps1 index 31f4439a..36f3254b 100644 --- a/src/functions/reports/Get-TssReportCategory.ps1 +++ b/src/functions/reports/Get-TssReportCategory.ps1 @@ -53,7 +53,7 @@ function Get-TssReportCategory { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssReportCatParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation if ($tssReportCatParams['Id']) { foreach ($reportCategory in $Id) { $restResponse = $null diff --git a/src/functions/reports/Get-TssReportParameter.ps1 b/src/functions/reports/Get-TssReportParameter.ps1 index d464aecc..92e60b00 100644 --- a/src/functions/reports/Get-TssReportParameter.ps1 +++ b/src/functions/reports/Get-TssReportParameter.ps1 @@ -42,7 +42,7 @@ function Get-TssReportParameter { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'reports', $Id, 'defaultparameters' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/reports/Get-TssReportSchedule.ps1 b/src/functions/reports/Get-TssReportSchedule.ps1 index 3864bf2c..c6843aeb 100644 --- a/src/functions/reports/Get-TssReportSchedule.ps1 +++ b/src/functions/reports/Get-TssReportSchedule.ps1 @@ -42,7 +42,7 @@ function Get-TssReportSchedule { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000032' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000032' $PSCmdlet.MyInvocation foreach ($schedule in $ScheduleId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'reports', 'schedules', $schedule -join '/' diff --git a/src/functions/reports/Invoke-TssReport.ps1 b/src/functions/reports/Invoke-TssReport.ps1 index 219e8c9c..7c1d0ed4 100644 --- a/src/functions/reports/Invoke-TssReport.ps1 +++ b/src/functions/reports/Invoke-TssReport.ps1 @@ -61,7 +61,7 @@ function Invoke-TssReport { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'reports', 'execute' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'POST' diff --git a/src/functions/reports/New-TssReport.ps1 b/src/functions/reports/New-TssReport.ps1 index d89463f2..a8989ba6 100644 --- a/src/functions/reports/New-TssReport.ps1 +++ b/src/functions/reports/New-TssReport.ps1 @@ -88,7 +88,7 @@ function New-TssReport { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewReportParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'reports' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/reports/New-TssReportSchedule.ps1 b/src/functions/reports/New-TssReportSchedule.ps1 index 4fadabf6..d93cd569 100644 --- a/src/functions/reports/New-TssReportSchedule.ps1 +++ b/src/functions/reports/New-TssReportSchedule.ps1 @@ -241,7 +241,7 @@ function New-TssReportSchedule { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'reports', 'schedules' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'POST' diff --git a/src/functions/reports/Remove-TssReport.ps1 b/src/functions/reports/Remove-TssReport.ps1 index d7164a09..3d9ae764 100644 --- a/src/functions/reports/Remove-TssReport.ps1 +++ b/src/functions/reports/Remove-TssReport.ps1 @@ -42,7 +42,7 @@ function Remove-TssReport { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($report in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'reports', $report -join '/' diff --git a/src/functions/reports/Remove-TssReportCategory.ps1 b/src/functions/reports/Remove-TssReportCategory.ps1 index 88e6eb94..529be015 100644 --- a/src/functions/reports/Remove-TssReportCategory.ps1 +++ b/src/functions/reports/Remove-TssReportCategory.ps1 @@ -51,7 +51,7 @@ function Remove-TssReportCategory { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($category in $ReportCategoryId) { $uri = $TssSession.ApiUrl, 'reports/categories', $category -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/reports/Remove-TssReportSchedule.ps1 b/src/functions/reports/Remove-TssReportSchedule.ps1 index 0969eb33..b14f5bae 100644 --- a/src/functions/reports/Remove-TssReportSchedule.ps1 +++ b/src/functions/reports/Remove-TssReportSchedule.ps1 @@ -42,7 +42,7 @@ function Remove-TssReportSchedule { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000033' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000033' $PSCmdlet.MyInvocation foreach ($schedule in $ScheduleId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'reports', 'schedules', $schedule -join '/' diff --git a/src/functions/reports/Search-TssReport.ps1 b/src/functions/reports/Search-TssReport.ps1 index 3b0b2b9d..565a6584 100644 --- a/src/functions/reports/Search-TssReport.ps1 +++ b/src/functions/reports/Search-TssReport.ps1 @@ -62,7 +62,7 @@ function Search-TssReport { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'reports' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' $invokeParams.Method = 'GET' diff --git a/src/functions/reports/Search-TssReportSchedule.ps1 b/src/functions/reports/Search-TssReportSchedule.ps1 index 6226e737..4d3add93 100644 --- a/src/functions/reports/Search-TssReportSchedule.ps1 +++ b/src/functions/reports/Search-TssReportSchedule.ps1 @@ -55,7 +55,7 @@ function Search-TssReportSchedule { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'reports', 'schedules' -join '/' $uri += "?sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" diff --git a/src/functions/roles/Search-TssRole.ps1 b/src/functions/roles/Search-TssRole.ps1 index 4cb244f2..d789c00f 100644 --- a/src/functions/roles/Search-TssRole.ps1 +++ b/src/functions/roles/Search-TssRole.ps1 @@ -60,7 +60,7 @@ function Search-TssRole { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'roles' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/rpc/Get-TssRpcAssociatedSecret.ps1 b/src/functions/rpc/Get-TssRpcAssociatedSecret.ps1 index 723aae69..ea801f23 100644 --- a/src/functions/rpc/Get-TssRpcAssociatedSecret.ps1 +++ b/src/functions/rpc/Get-TssRpcAssociatedSecret.ps1 @@ -44,7 +44,7 @@ function Get-TssRpcAssociatedSecret { . $InternalEndpointUsed $PSCmdlet.MyInvocation Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl.Replace('api/v1', 'internals'), 'secret-detail', $secret, 'rpc' -join '/' diff --git a/src/functions/rpc/Get-TssRpcPasswordType.ps1 b/src/functions/rpc/Get-TssRpcPasswordType.ps1 index 6bd92ce6..0163b882 100644 --- a/src/functions/rpc/Get-TssRpcPasswordType.ps1 +++ b/src/functions/rpc/Get-TssRpcPasswordType.ps1 @@ -43,7 +43,7 @@ function Get-TssRpcPasswordType { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($passwordType in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'rpc', 'password-types', $passwordType -join '/' diff --git a/src/functions/rpc/Search-TssRpcPasswordType.ps1 b/src/functions/rpc/Search-TssRpcPasswordType.ps1 index 67d6cf8e..a0badc65 100644 --- a/src/functions/rpc/Search-TssRpcPasswordType.ps1 +++ b/src/functions/rpc/Search-TssRpcPasswordType.ps1 @@ -50,7 +50,7 @@ function Search-TssRpcPasswordType { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'rpc', 'password-types' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/scripts/Get-TssScript.ps1 b/src/functions/scripts/Get-TssScript.ps1 index 4cfa9070..215af12e 100644 --- a/src/functions/scripts/Get-TssScript.ps1 +++ b/src/functions/scripts/Get-TssScript.ps1 @@ -42,7 +42,7 @@ function Get-TssScript { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($script in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'userscripts', $script -join '/' diff --git a/src/functions/scripts/New-TssScript.ps1 b/src/functions/scripts/New-TssScript.ps1 index 9eee1446..2603d560 100644 --- a/src/functions/scripts/New-TssScript.ps1 +++ b/src/functions/scripts/New-TssScript.ps1 @@ -61,7 +61,7 @@ function New-TssScript { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'userscripts' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'POST' diff --git a/src/functions/scripts/Search-TssScript.ps1 b/src/functions/scripts/Search-TssScript.ps1 index a4c82a6e..ffef80b0 100644 --- a/src/functions/scripts/Search-TssScript.ps1 +++ b/src/functions/scripts/Search-TssScript.ps1 @@ -48,7 +48,7 @@ function Search-TssScript { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'userscripts' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' $invokeParams.Method = 'GET' diff --git a/src/functions/secret-access-requests/Get-TssSecretAccessRequest.ps1 b/src/functions/secret-access-requests/Get-TssSecretAccessRequest.ps1 index 4f7ea10e..b085aa45 100644 --- a/src/functions/secret-access-requests/Get-TssSecretAccessRequest.ps1 +++ b/src/functions/secret-access-requests/Get-TssSecretAccessRequest.ps1 @@ -42,7 +42,7 @@ function Get-TssSecretAccessRequest { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation foreach ($request in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-access-requests', $request -join '/' diff --git a/src/functions/secret-access-requests/Get-TssSecretAccessRequestOption.ps1 b/src/functions/secret-access-requests/Get-TssSecretAccessRequestOption.ps1 index f8c44cde..2f1df6dc 100644 --- a/src/functions/secret-access-requests/Get-TssSecretAccessRequestOption.ps1 +++ b/src/functions/secret-access-requests/Get-TssSecretAccessRequestOption.ps1 @@ -42,7 +42,7 @@ function Get-TssSecretAccessRequestOption { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-access-requests', 'secrets', $secret, 'options' -join '/' diff --git a/src/functions/secret-access-requests/Get-TssSecretAccessRequestSecret.ps1 b/src/functions/secret-access-requests/Get-TssSecretAccessRequestSecret.ps1 index 3d6d45fe..fadaf71b 100644 --- a/src/functions/secret-access-requests/Get-TssSecretAccessRequestSecret.ps1 +++ b/src/functions/secret-access-requests/Get-TssSecretAccessRequestSecret.ps1 @@ -42,7 +42,7 @@ function Get-TssSecretAccessRequestSecret { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $SecretId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-access-requests', 'secrets', $secret -join '/' diff --git a/src/functions/secret-access-requests/Search-TssSecretAccessRequest.ps1 b/src/functions/secret-access-requests/Search-TssSecretAccessRequest.ps1 index 938504b8..e9edf130 100644 --- a/src/functions/secret-access-requests/Search-TssSecretAccessRequest.ps1 +++ b/src/functions/secret-access-requests/Search-TssSecretAccessRequest.ps1 @@ -55,7 +55,7 @@ function Search-TssSecretAccessRequest { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'secret-access-requests' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' $invokeParams.Method = 'GET' diff --git a/src/functions/secret-access-requests/Update-TssSecretAccessRequest.ps1 b/src/functions/secret-access-requests/Update-TssSecretAccessRequest.ps1 index b16fdfd7..54078457 100644 --- a/src/functions/secret-access-requests/Update-TssSecretAccessRequest.ps1 +++ b/src/functions/secret-access-requests/Update-TssSecretAccessRequest.ps1 @@ -58,7 +58,7 @@ function Update-TssSecretAccessRequest { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($updateParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-access-requests' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secret-access-requests/Write-TssSecretAccessRequestViewComment.ps1 b/src/functions/secret-access-requests/Write-TssSecretAccessRequestViewComment.ps1 index 35cea9b5..b084dcd6 100644 --- a/src/functions/secret-access-requests/Write-TssSecretAccessRequestViewComment.ps1 +++ b/src/functions/secret-access-requests/Write-TssSecretAccessRequestViewComment.ps1 @@ -53,7 +53,7 @@ function Write-TssSecretAccessRequestViewComment { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $uri = $TssSession.ApiUrl, 'secret-access-requests', 'secrets', $secret, 'view-comment' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secret-dependencies/Get-TssSecretDependency.ps1 b/src/functions/secret-dependencies/Get-TssSecretDependency.ps1 index 8bbde14e..8415a85c 100644 --- a/src/functions/secret-dependencies/Get-TssSecretDependency.ps1 +++ b/src/functions/secret-dependencies/Get-TssSecretDependency.ps1 @@ -43,7 +43,7 @@ function Get-TssSecretDependency { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($dependency in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-dependencies', $dependency -join '/' diff --git a/src/functions/secret-dependencies/Get-TssSecretDependencyGroup.ps1 b/src/functions/secret-dependencies/Get-TssSecretDependencyGroup.ps1 index 9e7d20a4..0624f2da 100644 --- a/src/functions/secret-dependencies/Get-TssSecretDependencyGroup.ps1 +++ b/src/functions/secret-dependencies/Get-TssSecretDependencyGroup.ps1 @@ -43,7 +43,7 @@ function Get-TssSecretDependencyGroup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-dependencies', 'groups', $secret -join '/' diff --git a/src/functions/secret-dependencies/Get-TssSecretDependencyRunStatus.ps1 b/src/functions/secret-dependencies/Get-TssSecretDependencyRunStatus.ps1 index cf99c9ae..025edbb4 100644 --- a/src/functions/secret-dependencies/Get-TssSecretDependencyRunStatus.ps1 +++ b/src/functions/secret-dependencies/Get-TssSecretDependencyRunStatus.ps1 @@ -43,7 +43,7 @@ function Get-TssSecretDependencyRunStatus { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($run in $Identifier) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-dependencies', 'run', $run -join '/' diff --git a/src/functions/secret-dependencies/Get-TssSecretDependencyScript.ps1 b/src/functions/secret-dependencies/Get-TssSecretDependencyScript.ps1 index ac5621c8..643fd5ce 100644 --- a/src/functions/secret-dependencies/Get-TssSecretDependencyScript.ps1 +++ b/src/functions/secret-dependencies/Get-TssSecretDependencyScript.ps1 @@ -36,7 +36,7 @@ function Get-TssSecretDependencyScript { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000064' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'secret-dependencies', 'scripts' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/secret-dependencies/Get-TssSecretDependencyStub.ps1 b/src/functions/secret-dependencies/Get-TssSecretDependencyStub.ps1 index 7e4bfb72..fee0949b 100644 --- a/src/functions/secret-dependencies/Get-TssSecretDependencyStub.ps1 +++ b/src/functions/secret-dependencies/Get-TssSecretDependencyStub.ps1 @@ -59,7 +59,7 @@ function Get-TssSecretDependencyStub { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $invokeParams.Method = 'GET' diff --git a/src/functions/secret-dependencies/Get-TssSecretDependencyTemplate.ps1 b/src/functions/secret-dependencies/Get-TssSecretDependencyTemplate.ps1 index 75b062f2..e8936c91 100644 --- a/src/functions/secret-dependencies/Get-TssSecretDependencyTemplate.ps1 +++ b/src/functions/secret-dependencies/Get-TssSecretDependencyTemplate.ps1 @@ -56,7 +56,7 @@ function Get-TssSecretDependencyTemplate { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-dependencies', 'templates' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secret-dependencies/New-TssSecretDependency.ps1 b/src/functions/secret-dependencies/New-TssSecretDependency.ps1 index 2b9a8cae..0a733d9a 100644 --- a/src/functions/secret-dependencies/New-TssSecretDependency.ps1 +++ b/src/functions/secret-dependencies/New-TssSecretDependency.ps1 @@ -42,7 +42,7 @@ function New-TssSecretDependency { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-dependencies' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secret-dependencies/New-TssSecretDependencyGroup.ps1 b/src/functions/secret-dependencies/New-TssSecretDependencyGroup.ps1 index 7c7a6a96..420714c5 100644 --- a/src/functions/secret-dependencies/New-TssSecretDependencyGroup.ps1 +++ b/src/functions/secret-dependencies/New-TssSecretDependencyGroup.ps1 @@ -57,7 +57,7 @@ function New-TssSecretDependencyGroup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-dependencies', 'groups', $secret -join '/' diff --git a/src/functions/secret-dependencies/Remove-TssSecretDependency.ps1 b/src/functions/secret-dependencies/Remove-TssSecretDependency.ps1 index e3257c07..3a88e6d1 100644 --- a/src/functions/secret-dependencies/Remove-TssSecretDependency.ps1 +++ b/src/functions/secret-dependencies/Remove-TssSecretDependency.ps1 @@ -43,7 +43,7 @@ function Remove-TssSecretDependency { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($dependency in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-dependencies', $dependency -join '/' diff --git a/src/functions/secret-dependencies/Search-TssSecretDependency.ps1 b/src/functions/secret-dependencies/Search-TssSecretDependency.ps1 index 533e68b8..e24caae1 100644 --- a/src/functions/secret-dependencies/Search-TssSecretDependency.ps1 +++ b/src/functions/secret-dependencies/Search-TssSecretDependency.ps1 @@ -68,7 +68,7 @@ function Search-TssSecretDependency { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-dependencies' -join '/' diff --git a/src/functions/secret-dependencies/Start-TssSecretDependency.ps1 b/src/functions/secret-dependencies/Start-TssSecretDependency.ps1 index 4e51495b..8084b919 100644 --- a/src/functions/secret-dependencies/Start-TssSecretDependency.ps1 +++ b/src/functions/secret-dependencies/Start-TssSecretDependency.ps1 @@ -44,7 +44,7 @@ function Start-TssSecretDependency { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-dependencies', 'run' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secret-hooks/Get-TssSecretHook.ps1 b/src/functions/secret-hooks/Get-TssSecretHook.ps1 index 4160638f..106e9953 100644 --- a/src/functions/secret-hooks/Get-TssSecretHook.ps1 +++ b/src/functions/secret-hooks/Get-TssSecretHook.ps1 @@ -48,7 +48,7 @@ function Get-TssSecretHook { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-detail', $SecretId, 'hook', 'get', $SecretHookId -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secret-hooks/Get-TssSecretHookStub.ps1 b/src/functions/secret-hooks/Get-TssSecretHookStub.ps1 index 98c58acd..665c47dc 100644 --- a/src/functions/secret-hooks/Get-TssSecretHookStub.ps1 +++ b/src/functions/secret-hooks/Get-TssSecretHookStub.ps1 @@ -63,7 +63,7 @@ function Get-TssSecretHookStub { } process { if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $SecretId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-detail', $secret, 'hook', 'stub', $ScriptId -join '/' diff --git a/src/functions/secret-hooks/New-TssSecretHook.ps1 b/src/functions/secret-hooks/New-TssSecretHook.ps1 index ccbf32a5..5689cc37 100644 --- a/src/functions/secret-hooks/New-TssSecretHook.ps1 +++ b/src/functions/secret-hooks/New-TssSecretHook.ps1 @@ -48,7 +48,7 @@ function New-TssSecretHook { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $SecretId) { $uri = $TssSession.ApiUrl, 'secret-detail', $secret, 'hook' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secret-hooks/Remove-TssSecretHook.ps1 b/src/functions/secret-hooks/Remove-TssSecretHook.ps1 index 5259c27f..e354d9e3 100644 --- a/src/functions/secret-hooks/Remove-TssSecretHook.ps1 +++ b/src/functions/secret-hooks/Remove-TssSecretHook.ps1 @@ -47,7 +47,7 @@ function Remove-TssSecretHook { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($hook in $SecretHookId) { $uri = $TssSession.ApiUrl, 'secret-detail', $SecretId, 'hook', $hook -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secret-hooks/Search-TssSecretHook.ps1 b/src/functions/secret-hooks/Search-TssSecretHook.ps1 index 75e8bec3..40be9191 100644 --- a/src/functions/secret-hooks/Search-TssSecretHook.ps1 +++ b/src/functions/secret-hooks/Search-TssSecretHook.ps1 @@ -42,7 +42,7 @@ function Search-TssSecretHook { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-detail', $secret, 'hooks' -join '/' diff --git a/src/functions/secret-hooks/Update-TssSecretHook.ps1 b/src/functions/secret-hooks/Update-TssSecretHook.ps1 index ba277fef..54792cd4 100644 --- a/src/functions/secret-hooks/Update-TssSecretHook.ps1 +++ b/src/functions/secret-hooks/Update-TssSecretHook.ps1 @@ -131,7 +131,7 @@ function Update-TssSecretHook { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($updateParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'secret-detail', $SecretId, 'hook', $SecretHookId -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'PUT' diff --git a/src/functions/secret-permissions/New-TssSecretPermission.ps1 b/src/functions/secret-permissions/New-TssSecretPermission.ps1 index 1a5c4a52..ae997a41 100644 --- a/src/functions/secret-permissions/New-TssSecretPermission.ps1 +++ b/src/functions/secret-permissions/New-TssSecretPermission.ps1 @@ -74,7 +74,7 @@ function New-TssSecretPermission { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $SecretId) { $searchSecrets = Search-TssSecret $TssSession $secretInheritsPerm = $searchSecrets.Where({ $_.SecretId -eq $secret}).InheritsPermissions diff --git a/src/functions/secret-permissions/Remove-TssSecretPermission.ps1 b/src/functions/secret-permissions/Remove-TssSecretPermission.ps1 index a6ad383c..4e7bb010 100644 --- a/src/functions/secret-permissions/Remove-TssSecretPermission.ps1 +++ b/src/functions/secret-permissions/Remove-TssSecretPermission.ps1 @@ -42,7 +42,7 @@ function Remove-TssSecretPermission { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secretP in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-permissions', $secretP -join '/' diff --git a/src/functions/secret-permissions/Search-TssSecretPermission.ps1 b/src/functions/secret-permissions/Search-TssSecretPermission.ps1 index 0b4bd1f4..a04b57f8 100644 --- a/src/functions/secret-permissions/Search-TssSecretPermission.ps1 +++ b/src/functions/secret-permissions/Search-TssSecretPermission.ps1 @@ -82,7 +82,7 @@ function Search-TssSecretPermission { } Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-permissions' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/secret-permissions/Update-TssSecretPermission.ps1 b/src/functions/secret-permissions/Update-TssSecretPermission.ps1 index 30922676..2f6bf43a 100644 --- a/src/functions/secret-permissions/Update-TssSecretPermission.ps1 +++ b/src/functions/secret-permissions/Update-TssSecretPermission.ps1 @@ -53,7 +53,7 @@ function Update-TssSecretPermission { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secretP in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-permissions', $secretP -join '/' diff --git a/src/functions/secret-policies/Get-TssSecretPolicy.ps1 b/src/functions/secret-policies/Get-TssSecretPolicy.ps1 index 85392239..74c838ca 100644 --- a/src/functions/secret-policies/Get-TssSecretPolicy.ps1 +++ b/src/functions/secret-policies/Get-TssSecretPolicy.ps1 @@ -48,7 +48,7 @@ function Get-TssSecretPolicy { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation foreach ($policy in $Id) { $uri = $TssSession.ApiUrl, 'secret-policy', $policy -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secret-policies/Get-TssSecretPolicyStub.ps1 b/src/functions/secret-policies/Get-TssSecretPolicyStub.ps1 index 92c1e0d0..171bf3b7 100644 --- a/src/functions/secret-policies/Get-TssSecretPolicyStub.ps1 +++ b/src/functions/secret-policies/Get-TssSecretPolicyStub.ps1 @@ -36,7 +36,7 @@ function Get-TssSecretPolicyStub { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'secret-policy', 'stub' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'GET' diff --git a/src/functions/secret-policies/New-TssSecretPolicy.ps1 b/src/functions/secret-policies/New-TssSecretPolicy.ps1 index e0e0011a..bc444bf7 100644 --- a/src/functions/secret-policies/New-TssSecretPolicy.ps1 +++ b/src/functions/secret-policies/New-TssSecretPolicy.ps1 @@ -63,7 +63,7 @@ function New-TssSecretPolicy { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'secret-policy' -join '/' $invokeParams.Uri = $uri $invokeParams.Method = 'POST' diff --git a/src/functions/secret-policies/Search-TssSecretPolicy.ps1 b/src/functions/secret-policies/Search-TssSecretPolicy.ps1 index 1ee96858..9d1ef502 100644 --- a/src/functions/secret-policies/Search-TssSecretPolicy.ps1 +++ b/src/functions/secret-policies/Search-TssSecretPolicy.ps1 @@ -48,7 +48,7 @@ function Search-TssSecretPolicy { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-policy', 'search' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/secret-policies/Set-TssSecretPolicy.ps1 b/src/functions/secret-policies/Set-TssSecretPolicy.ps1 index e40fb5d6..e48ea87a 100644 --- a/src/functions/secret-policies/Set-TssSecretPolicy.ps1 +++ b/src/functions/secret-policies/Set-TssSecretPolicy.ps1 @@ -69,7 +69,7 @@ function Set-TssSecretPolicy { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000005' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-policy', $Id -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secret-templates/Add-TssSecretTemplateField.ps1 b/src/functions/secret-templates/Add-TssSecretTemplateField.ps1 index 9d05ce23..a545fd5b 100644 --- a/src/functions/secret-templates/Add-TssSecretTemplateField.ps1 +++ b/src/functions/secret-templates/Add-TssSecretTemplateField.ps1 @@ -49,7 +49,7 @@ function Add-TssSecretTemplateField { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($template in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-templates', $template -join '/' diff --git a/src/functions/secret-templates/Get-TssSecretTemplate.ps1 b/src/functions/secret-templates/Get-TssSecretTemplate.ps1 index 37f8cbfd..28b89210 100644 --- a/src/functions/secret-templates/Get-TssSecretTemplate.ps1 +++ b/src/functions/secret-templates/Get-TssSecretTemplate.ps1 @@ -43,7 +43,7 @@ function Get-TssSecretTemplate { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($template in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-templates', $template -join '/' diff --git a/src/functions/secret-templates/Get-TssSecretTemplateFolder.ps1 b/src/functions/secret-templates/Get-TssSecretTemplateFolder.ps1 index 79179a52..8fcd9606 100644 --- a/src/functions/secret-templates/Get-TssSecretTemplateFolder.ps1 +++ b/src/functions/secret-templates/Get-TssSecretTemplateFolder.ps1 @@ -41,7 +41,7 @@ function Get-TssSecretTemplateFolder { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($folder in $FolderId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'templates', $folder -join '/' diff --git a/src/functions/secret-templates/New-TssSecretTemplate.ps1 b/src/functions/secret-templates/New-TssSecretTemplate.ps1 index 25ef2819..53c97da7 100644 --- a/src/functions/secret-templates/New-TssSecretTemplate.ps1 +++ b/src/functions/secret-templates/New-TssSecretTemplate.ps1 @@ -81,7 +81,7 @@ function New-TssSecretTemplate { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-templates' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secret-templates/Search-TssSecretTemplate.ps1 b/src/functions/secret-templates/Search-TssSecretTemplate.ps1 index 32b119bd..e5825d5e 100644 --- a/src/functions/secret-templates/Search-TssSecretTemplate.ps1 +++ b/src/functions/secret-templates/Search-TssSecretTemplate.ps1 @@ -53,7 +53,7 @@ function Search-TssSecretTemplate { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-templates' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/secret-templates/Set-TssSecretTemplate.ps1 b/src/functions/secret-templates/Set-TssSecretTemplate.ps1 index e42a0ef6..71e36a0c 100644 --- a/src/functions/secret-templates/Set-TssSecretTemplate.ps1 +++ b/src/functions/secret-templates/Set-TssSecretTemplate.ps1 @@ -46,7 +46,7 @@ function Set-TssSecretTemplate { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($template in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-templates', $template -join '/' diff --git a/src/functions/secret-templates/Update-TssSecretTemplateField.ps1 b/src/functions/secret-templates/Update-TssSecretTemplateField.ps1 index def5e7e1..1c853f2d 100644 --- a/src/functions/secret-templates/Update-TssSecretTemplateField.ps1 +++ b/src/functions/secret-templates/Update-TssSecretTemplateField.ps1 @@ -48,7 +48,7 @@ function Update-TssSecretTemplateField { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($updateParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secret-templates', $TemplateId -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secrets/Add-TssSecretPermission.ps1 b/src/functions/secrets/Add-TssSecretPermission.ps1 index 93c78a15..86305202 100644 --- a/src/functions/secrets/Add-TssSecretPermission.ps1 +++ b/src/functions/secrets/Add-TssSecretPermission.ps1 @@ -80,7 +80,7 @@ function Add-TssSecretPermission { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('Username')) { $users = Search-TssUser -TssSession $TssSession diff --git a/src/functions/secrets/Close-TssSecret.ps1 b/src/functions/secrets/Close-TssSecret.ps1 index 92aec3bc..0f6a16ad 100644 --- a/src/functions/secrets/Close-TssSecret.ps1 +++ b/src/functions/secrets/Close-TssSecret.ps1 @@ -88,7 +88,7 @@ function Close-TssSecret { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($protectParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $uri = $TssSession.ApiUrl, 'secrets', $secret, 'check-in' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secrets/Disable-TssSecretCheckout.ps1 b/src/functions/secrets/Disable-TssSecretCheckout.ps1 index cfaeb10c..3bbb6317 100644 --- a/src/functions/secrets/Disable-TssSecretCheckout.ps1 +++ b/src/functions/secrets/Disable-TssSecretCheckout.ps1 @@ -70,7 +70,7 @@ function Disable-TssSecretCheckout { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $uri = $TssSession.ApiUrl, 'secrets', $secret, 'security-checkout' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secrets/Disable-TssSecretEmail.ps1 b/src/functions/secrets/Disable-TssSecretEmail.ps1 index 6b866cef..6fd6585d 100644 --- a/src/functions/secrets/Disable-TssSecretEmail.ps1 +++ b/src/functions/secrets/Disable-TssSecretEmail.ps1 @@ -82,7 +82,7 @@ function Disable-TssSecretEmail { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $uri = $TssSession.ApiUrl, 'secrets', $secret, 'email' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secrets/Enable-TssSecretCheckout.ps1 b/src/functions/secrets/Enable-TssSecretCheckout.ps1 index 110242aa..99f77a30 100644 --- a/src/functions/secrets/Enable-TssSecretCheckout.ps1 +++ b/src/functions/secrets/Enable-TssSecretCheckout.ps1 @@ -79,7 +79,7 @@ function Enable-TssSecretCheckout { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $uri = $TssSession.ApiUrl, 'secrets', $secret, 'security-checkout' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secrets/Enable-TssSecretEmail.ps1 b/src/functions/secrets/Enable-TssSecretEmail.ps1 index e0138c7c..7492b40a 100644 --- a/src/functions/secrets/Enable-TssSecretEmail.ps1 +++ b/src/functions/secrets/Enable-TssSecretEmail.ps1 @@ -82,7 +82,7 @@ function Enable-TssSecretEmail { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $uri = $TssSession.ApiUrl, 'secrets', $secret, 'email' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secrets/Find-TssSecret.ps1 b/src/functions/secrets/Find-TssSecret.ps1 index d2624726..6148ed03 100644 --- a/src/functions/secrets/Find-TssSecret.ps1 +++ b/src/functions/secrets/Find-TssSecret.ps1 @@ -171,7 +171,7 @@ function Find-TssSecret { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation if ($tssParams['Id']) { $uri = $TssSession.ApiUrl , 'secrets/lookup', $Id -join '/' } else { diff --git a/src/functions/secrets/Get-TssSecret.ps1 b/src/functions/secrets/Get-TssSecret.ps1 index cab91fec..e5add8f2 100644 --- a/src/functions/secrets/Get-TssSecret.ps1 +++ b/src/functions/secrets/Get-TssSecret.ps1 @@ -147,7 +147,7 @@ function Get-TssSecret { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { if ($tssParams.ContainsKey('Path')) { - . $CheckVersion $TssSession '11.0.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '11.0.000000' $PSCmdlet.MyInvocation foreach ($p in $Path) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', 0 -join '/' @@ -172,7 +172,7 @@ function Get-TssSecret { } if ($tssParams.ContainsKey('Id')) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret -join '/' diff --git a/src/functions/secrets/Get-TssSecretAttachment.ps1 b/src/functions/secrets/Get-TssSecretAttachment.ps1 index 2160a419..dbdeffa4 100644 --- a/src/functions/secrets/Get-TssSecretAttachment.ps1 +++ b/src/functions/secrets/Get-TssSecretAttachment.ps1 @@ -83,7 +83,7 @@ function Get-TssSecretAttachment { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $currentSecret = $null diff --git a/src/functions/secrets/Get-TssSecretAudit.ps1 b/src/functions/secrets/Get-TssSecretAudit.ps1 index a1fa8431..2a74c6bd 100644 --- a/src/functions/secrets/Get-TssSecretAudit.ps1 +++ b/src/functions/secrets/Get-TssSecretAudit.ps1 @@ -50,7 +50,7 @@ function Get-TssSecretAudit { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000032' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000032' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret, 'audits' -join '/' diff --git a/src/functions/secrets/Get-TssSecretField.ps1 b/src/functions/secrets/Get-TssSecretField.ps1 index 324d390a..87211498 100644 --- a/src/functions/secrets/Get-TssSecretField.ps1 +++ b/src/functions/secrets/Get-TssSecretField.ps1 @@ -95,7 +95,7 @@ function Get-TssSecretField { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $uri = $TssSession.ApiUrl, 'secrets', $secret -join '/' diff --git a/src/functions/secrets/Get-TssSecretHeartbeatStatus.ps1 b/src/functions/secrets/Get-TssSecretHeartbeatStatus.ps1 index 2fd8c437..132039d2 100644 --- a/src/functions/secrets/Get-TssSecretHeartbeatStatus.ps1 +++ b/src/functions/secrets/Get-TssSecretHeartbeatStatus.ps1 @@ -43,7 +43,7 @@ function Get-TssSecretHeartbeatStatus { . $InternalEndpointUsed $PSCmdlet.MyInvocation Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl.Replace('api/v1', 'internals'), 'secret-detail', $secret, 'heartbeat-status' -join '/' diff --git a/src/functions/secrets/Get-TssSecretPasswordStatus.ps1 b/src/functions/secrets/Get-TssSecretPasswordStatus.ps1 index 6bb659c5..5265a1ee 100644 --- a/src/functions/secrets/Get-TssSecretPasswordStatus.ps1 +++ b/src/functions/secrets/Get-TssSecretPasswordStatus.ps1 @@ -44,7 +44,7 @@ function Get-TssSecretPasswordStatus { . $InternalEndpointUsed $PSCmdlet.MyInvocation Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl.Replace('api/v1', 'internals'), 'secret-detail', $secret, 'password-status' -join '/' diff --git a/src/functions/secrets/Get-TssSecretSetting.ps1 b/src/functions/secrets/Get-TssSecretSetting.ps1 index 3223dc70..eb3c48d6 100644 --- a/src/functions/secrets/Get-TssSecretSetting.ps1 +++ b/src/functions/secrets/Get-TssSecretSetting.ps1 @@ -43,7 +43,7 @@ function Get-TssSecretSetting { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret, 'settings' -join '/' diff --git a/src/functions/secrets/Get-TssSecretState.ps1 b/src/functions/secrets/Get-TssSecretState.ps1 index aa118bfc..1027561e 100644 --- a/src/functions/secrets/Get-TssSecretState.ps1 +++ b/src/functions/secrets/Get-TssSecretState.ps1 @@ -43,7 +43,7 @@ function Get-TssSecretState { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret, 'state' -join '/' diff --git a/src/functions/secrets/Get-TssSecretStub.ps1 b/src/functions/secrets/Get-TssSecretStub.ps1 index 9b938b90..14743fc5 100644 --- a/src/functions/secrets/Get-TssSecretStub.ps1 +++ b/src/functions/secrets/Get-TssSecretStub.ps1 @@ -56,7 +56,7 @@ function Get-TssSecretStub { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', 'stub' -join '/' $uri = $uri, "secretTemplateId=$SecretTemplateId" -join '?' diff --git a/src/functions/secrets/Get-TssSecretSummary.ps1 b/src/functions/secrets/Get-TssSecretSummary.ps1 index a304bbdb..fe75caf4 100644 --- a/src/functions/secrets/Get-TssSecretSummary.ps1 +++ b/src/functions/secrets/Get-TssSecretSummary.ps1 @@ -43,7 +43,7 @@ function Get-TssSecretSummary { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret, 'summary' -join '/' diff --git a/src/functions/secrets/Invoke-TssSecretGeneratePassword.ps1 b/src/functions/secrets/Invoke-TssSecretGeneratePassword.ps1 index 8ac5bccd..083fac76 100644 --- a/src/functions/secrets/Invoke-TssSecretGeneratePassword.ps1 +++ b/src/functions/secrets/Invoke-TssSecretGeneratePassword.ps1 @@ -50,7 +50,7 @@ function Invoke-TssSecretGeneratePassword { . $InternalEndpointUsed $PSCmdlet.MyInvocation Get-TssInvocation $PSCmdlet.MyInvocation if ($PSBoundParameters.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl.Replace('api/v1', 'internals'), 'secret-detail', $Id, 'generate-password', $Slug -join '/' $invokeGenerateParams.Uri = $uri $invokeGenerateParams.Method = 'GET' diff --git a/src/functions/secrets/New-TssSecret.ps1 b/src/functions/secrets/New-TssSecret.ps1 index c026f69b..cc265e83 100644 --- a/src/functions/secrets/New-TssSecret.ps1 +++ b/src/functions/secrets/New-TssSecret.ps1 @@ -61,7 +61,7 @@ function New-TssSecret { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/secrets/Open-TssSecret.ps1 b/src/functions/secrets/Open-TssSecret.ps1 index 0844dbba..660f9eee 100644 --- a/src/functions/secrets/Open-TssSecret.ps1 +++ b/src/functions/secrets/Open-TssSecret.ps1 @@ -66,7 +66,7 @@ function Open-TssSecret { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach($secret in $Id) { diff --git a/src/functions/secrets/Remove-TssSecret.ps1 b/src/functions/secrets/Remove-TssSecret.ps1 index 6077488f..36b14be0 100644 --- a/src/functions/secrets/Remove-TssSecret.ps1 +++ b/src/functions/secrets/Remove-TssSecret.ps1 @@ -43,7 +43,7 @@ function Remove-TssSecret { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $uri = $TssSession.ApiUrl, 'secrets', $secret -join '/' diff --git a/src/functions/secrets/Restore-TssSecret.ps1 b/src/functions/secrets/Restore-TssSecret.ps1 index a358cb7a..053c75fd 100644 --- a/src/functions/secrets/Restore-TssSecret.ps1 +++ b/src/functions/secrets/Restore-TssSecret.ps1 @@ -41,7 +41,7 @@ function Restore-TssSecret { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret, 'undelete' -join '/' diff --git a/src/functions/secrets/Revoke-TssSecret.ps1 b/src/functions/secrets/Revoke-TssSecret.ps1 index 6c484fa1..43b27e3c 100644 --- a/src/functions/secrets/Revoke-TssSecret.ps1 +++ b/src/functions/secrets/Revoke-TssSecret.ps1 @@ -79,7 +79,7 @@ function Revoke-TssSecret { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret, 'expire' -join '/' diff --git a/src/functions/secrets/Search-TssSecret.ps1 b/src/functions/secrets/Search-TssSecret.ps1 index 03b142f0..4c5de258 100644 --- a/src/functions/secrets/Search-TssSecret.ps1 +++ b/src/functions/secrets/Search-TssSecret.ps1 @@ -198,7 +198,7 @@ function Search-TssSecret { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $uri = $TssSession.ApiUrl, 'secrets' -join '/' $uri += "?sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" $uri += '&filter.includeRestricted=true' diff --git a/src/functions/secrets/Set-TssSecret.ps1 b/src/functions/secrets/Set-TssSecret.ps1 index 506d1887..2eb5f1bc 100644 --- a/src/functions/secrets/Set-TssSecret.ps1 +++ b/src/functions/secrets/Set-TssSecret.ps1 @@ -182,7 +182,7 @@ function Set-TssSecret { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setSecretParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { if ($secretParams.Count -gt 0) { $uri = $TssSession.ApiUrl, 'secrets', $secret -join '/' diff --git a/src/functions/secrets/Set-TssSecretExpiration.ps1 b/src/functions/secrets/Set-TssSecretExpiration.ps1 index f41d7e7a..27938d04 100644 --- a/src/functions/secrets/Set-TssSecretExpiration.ps1 +++ b/src/functions/secrets/Set-TssSecretExpiration.ps1 @@ -68,7 +68,7 @@ function Set-TssSecretExpiration { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret, 'expiration' -join '/' diff --git a/src/functions/secrets/Set-TssSecretField.ps1 b/src/functions/secrets/Set-TssSecretField.ps1 index acd3340d..49b6aaf0 100644 --- a/src/functions/secrets/Set-TssSecretField.ps1 +++ b/src/functions/secrets/Set-TssSecretField.ps1 @@ -132,7 +132,7 @@ function Set-TssSecretField { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation if ($setParams.ContainsKey('Clear') -and $setParams.ContainsKey('Value')) { Write-Warning 'Clear and Value provided, only one is supported' diff --git a/src/functions/secrets/Set-TssSecretRpcAssociated.ps1 b/src/functions/secrets/Set-TssSecretRpcAssociated.ps1 index 03ff57f6..07037d28 100644 --- a/src/functions/secrets/Set-TssSecretRpcAssociated.ps1 +++ b/src/functions/secrets/Set-TssSecretRpcAssociated.ps1 @@ -55,7 +55,7 @@ function Set-TssSecretRpcAssociated { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret, 'rpc-script-secrets' -join '/' diff --git a/src/functions/secrets/Set-TssSecretRpcPrivileged.ps1 b/src/functions/secrets/Set-TssSecretRpcPrivileged.ps1 index fcf9bb98..49ede48c 100644 --- a/src/functions/secrets/Set-TssSecretRpcPrivileged.ps1 +++ b/src/functions/secrets/Set-TssSecretRpcPrivileged.ps1 @@ -59,7 +59,7 @@ function Set-TssSecretRpcPrivileged { . $InternalEndpointUsed $PSCmdlet.MyInvocation Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl.Replace('api/v1', 'internals'), 'secret-detail', $secret, 'rpc' -join '/' diff --git a/src/functions/secrets/Set-TssSecretSecurity.ps1 b/src/functions/secrets/Set-TssSecretSecurity.ps1 index 4280cab3..b40a5ff5 100644 --- a/src/functions/secrets/Set-TssSecretSecurity.ps1 +++ b/src/functions/secrets/Set-TssSecretSecurity.ps1 @@ -65,7 +65,7 @@ function Set-TssSecretSecurity { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($setParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret, 'security-general' -join '/' diff --git a/src/functions/secrets/Start-TssSecretChangePassword.ps1 b/src/functions/secrets/Start-TssSecretChangePassword.ps1 index b87abbb5..ad1b358f 100644 --- a/src/functions/secrets/Start-TssSecretChangePassword.ps1 +++ b/src/functions/secrets/Start-TssSecretChangePassword.ps1 @@ -53,7 +53,7 @@ function Start-TssSecretChangePassword { . $InternalEndpointUsed $PSCmdlet.MyInvocation Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl.Replace('api/v1', 'internals'), 'secret-detail', $secret, 'change-password-now' -join '/' diff --git a/src/functions/secrets/Start-TssSecretHeartbeat.ps1 b/src/functions/secrets/Start-TssSecretHeartbeat.ps1 index 8c220a34..2f353c29 100644 --- a/src/functions/secrets/Start-TssSecretHeartbeat.ps1 +++ b/src/functions/secrets/Start-TssSecretHeartbeat.ps1 @@ -42,7 +42,7 @@ function Start-TssSecretHeartbeat { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret, 'heartbeat' -join '/' diff --git a/src/functions/secrets/Stop-TssSecretChangePassword.ps1 b/src/functions/secrets/Stop-TssSecretChangePassword.ps1 index b48ed886..ad5faf10 100644 --- a/src/functions/secrets/Stop-TssSecretChangePassword.ps1 +++ b/src/functions/secrets/Stop-TssSecretChangePassword.ps1 @@ -42,7 +42,7 @@ function Stop-TssSecretChangePassword { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'secrets', $secret, 'stop-password-change' -join '/' diff --git a/src/functions/secrets/Update-TssSecret.ps1 b/src/functions/secrets/Update-TssSecret.ps1 index f917320c..07c74ca7 100644 --- a/src/functions/secrets/Update-TssSecret.ps1 +++ b/src/functions/secrets/Update-TssSecret.ps1 @@ -75,7 +75,7 @@ function Update-TssSecret { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($updateParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $secretId = $Secret.Id $uri = $TssSession.ApiUrl, 'secrets', $secretId -join '/' diff --git a/src/functions/secrets/Update-TssSecretRdpLauncherSetting.ps1 b/src/functions/secrets/Update-TssSecretRdpLauncherSetting.ps1 index 2d4571b4..f07408ea 100644 --- a/src/functions/secrets/Update-TssSecretRdpLauncherSetting.ps1 +++ b/src/functions/secrets/Update-TssSecretRdpLauncherSetting.ps1 @@ -78,7 +78,7 @@ function Update-TssSecretRdpLauncherSetting { . $InternalEndpointUsed $PSCmdlet.MyInvocation Get-TssInvocation $PSCmdlet.MyInvocation if ($updateLaunchParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($secret in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl.Replace('api/v1', 'internals'), 'secret-detail', $secret, 'rdp-launcher-settings' -join '/' diff --git a/src/functions/sites/Get-TssSite.ps1 b/src/functions/sites/Get-TssSite.ps1 index a1162b1b..0c21d26e 100644 --- a/src/functions/sites/Get-TssSite.ps1 +++ b/src/functions/sites/Get-TssSite.ps1 @@ -40,7 +40,7 @@ function Get-TssSite { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'sites' -join '/' $uri = $uri, "includeInactive=$([boolean]$IncludeInactive)" -join '?' diff --git a/src/functions/users/Disable-TssUser.ps1 b/src/functions/users/Disable-TssUser.ps1 index 3f7f71fe..5429a746 100644 --- a/src/functions/users/Disable-TssUser.ps1 +++ b/src/functions/users/Disable-TssUser.ps1 @@ -41,7 +41,7 @@ function Disable-TssUser { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $Id) { $uri = $TssSession.ApiUrl, 'users', $user -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/users/Enable-TssUser.ps1 b/src/functions/users/Enable-TssUser.ps1 index 79cdbc57..22bd6fa5 100644 --- a/src/functions/users/Enable-TssUser.ps1 +++ b/src/functions/users/Enable-TssUser.ps1 @@ -41,7 +41,7 @@ function Enable-TssUser { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $Id) { $uri = $TssSession.ApiUrl, 'users', $user -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/users/Find-TssUser.ps1 b/src/functions/users/Find-TssUser.ps1 index c6220054..9c44c3bb 100644 --- a/src/functions/users/Find-TssUser.ps1 +++ b/src/functions/users/Find-TssUser.ps1 @@ -64,7 +64,7 @@ function Find-TssUser { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'users', 'lookup' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/users/Get-TssUser.ps1 b/src/functions/users/Get-TssUser.ps1 index cd9c381e..a4877098 100644 --- a/src/functions/users/Get-TssUser.ps1 +++ b/src/functions/users/Get-TssUser.ps1 @@ -46,7 +46,7 @@ function Get-TssUser { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'users', $user -join '/' diff --git a/src/functions/users/Get-TssUserAudit.ps1 b/src/functions/users/Get-TssUserAudit.ps1 index c35be6a5..ee97eea3 100644 --- a/src/functions/users/Get-TssUserAudit.ps1 +++ b/src/functions/users/Get-TssUserAudit.ps1 @@ -43,7 +43,7 @@ function Get-TssUserAudit { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $UserId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'users', $user, 'audit' -join '/' diff --git a/src/functions/users/Get-TssUserGroup.ps1 b/src/functions/users/Get-TssUserGroup.ps1 index 5b20c8fa..43969d49 100644 --- a/src/functions/users/Get-TssUserGroup.ps1 +++ b/src/functions/users/Get-TssUserGroup.ps1 @@ -46,7 +46,7 @@ function Get-TssUserGroup { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'users', $user, 'groups' -join '/' diff --git a/src/functions/users/Get-TssUserOwner.ps1 b/src/functions/users/Get-TssUserOwner.ps1 index 8ce68316..2aefac64 100644 --- a/src/functions/users/Get-TssUserOwner.ps1 +++ b/src/functions/users/Get-TssUserOwner.ps1 @@ -46,7 +46,7 @@ function Get-TssUserOwner { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'users', $user, 'owners' -join '/' diff --git a/src/functions/users/Get-TssUserRole.ps1 b/src/functions/users/Get-TssUserRole.ps1 index 4ba49352..38fac8a0 100644 --- a/src/functions/users/Get-TssUserRole.ps1 +++ b/src/functions/users/Get-TssUserRole.ps1 @@ -43,7 +43,7 @@ function Get-TssUserRole { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'users', $user, 'roles' -join '/' diff --git a/src/functions/users/Get-TssUserRoleAssigned.ps1 b/src/functions/users/Get-TssUserRoleAssigned.ps1 index 96a61c22..63958553 100644 --- a/src/functions/users/Get-TssUserRoleAssigned.ps1 +++ b/src/functions/users/Get-TssUserRoleAssigned.ps1 @@ -44,7 +44,7 @@ function Get-TssUserRoleAssigned { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000032' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000032' $PSCmdlet.MyInvocation foreach ($user in $UserId) { $restResponse = $null $uri = $TssSession.ApiUrl, 'users', $user, 'roles-assigned' -join '/' diff --git a/src/functions/users/Lock-TssUser.ps1 b/src/functions/users/Lock-TssUser.ps1 index babde66e..75c939cb 100644 --- a/src/functions/users/Lock-TssUser.ps1 +++ b/src/functions/users/Lock-TssUser.ps1 @@ -41,7 +41,7 @@ function Lock-TssUser { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $Id) { $uri = $TssSession.ApiUrl, 'users', $user -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/users/New-TssUser.ps1 b/src/functions/users/New-TssUser.ps1 index 51324d14..18c2fec1 100644 --- a/src/functions/users/New-TssUser.ps1 +++ b/src/functions/users/New-TssUser.ps1 @@ -88,7 +88,7 @@ function New-TssUser { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssNewParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'users' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/users/Remove-TssUserPii.ps1 b/src/functions/users/Remove-TssUserPii.ps1 index c2f59058..57194c4a 100644 --- a/src/functions/users/Remove-TssUserPii.ps1 +++ b/src/functions/users/Remove-TssUserPii.ps1 @@ -42,7 +42,7 @@ function Remove-TssUserPii { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'users', 'delete-pii', $user -join '/' diff --git a/src/functions/users/Reset-TssUserPassword.ps1 b/src/functions/users/Reset-TssUserPassword.ps1 index ad27cb92..ee9ccaea 100644 --- a/src/functions/users/Reset-TssUserPassword.ps1 +++ b/src/functions/users/Reset-TssUserPassword.ps1 @@ -46,7 +46,7 @@ function Reset-TssUserPassword { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($resetParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $Id) { $restResponse = $null $uri = $TssSession.ApiUrl, 'users', $user, 'password-reset' -join '/' diff --git a/src/functions/users/Search-TssUser.ps1 b/src/functions/users/Search-TssUser.ps1 index 69c7598d..feed6410 100644 --- a/src/functions/users/Search-TssUser.ps1 +++ b/src/functions/users/Search-TssUser.ps1 @@ -64,7 +64,7 @@ function Search-TssUser { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'users' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/functions/users/Show-TssCurrentUser.ps1 b/src/functions/users/Show-TssCurrentUser.ps1 index 02f74010..bc02c0f9 100644 --- a/src/functions/users/Show-TssCurrentUser.ps1 +++ b/src/functions/users/Show-TssCurrentUser.ps1 @@ -43,7 +43,7 @@ function Show-TssCurrentUser { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'users', 'current' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/users/Unlock-TssUser.ps1 b/src/functions/users/Unlock-TssUser.ps1 index 5cc5a70e..756f0a1d 100644 --- a/src/functions/users/Unlock-TssUser.ps1 +++ b/src/functions/users/Unlock-TssUser.ps1 @@ -41,7 +41,7 @@ function Unlock-TssUser { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation foreach ($user in $Id) { $uri = $TssSession.ApiUrl, 'users', $user -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/users/Update-TssUser.ps1 b/src/functions/users/Update-TssUser.ps1 index 6e82fd20..def7fb61 100644 --- a/src/functions/users/Update-TssUser.ps1 +++ b/src/functions/users/Update-TssUser.ps1 @@ -49,7 +49,7 @@ function Update-TssUser { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($updateParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'users', $Id -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/users/Update-TssUserPassword.ps1 b/src/functions/users/Update-TssUserPassword.ps1 index 208ce12d..78da6ec1 100644 --- a/src/functions/users/Update-TssUserPassword.ps1 +++ b/src/functions/users/Update-TssUserPassword.ps1 @@ -45,7 +45,7 @@ function Update-TssUserPassword { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'users', 'change-password' -join '/' $invokeParams.Uri = $uri diff --git a/src/functions/workflow-templates/Search-TssWorkflowTemplate.ps1 b/src/functions/workflow-templates/Search-TssWorkflowTemplate.ps1 index ad9bece3..c818dced 100644 --- a/src/functions/workflow-templates/Search-TssWorkflowTemplate.ps1 +++ b/src/functions/workflow-templates/Search-TssWorkflowTemplate.ps1 @@ -50,7 +50,7 @@ function Search-TssWorkflowTemplate { process { Get-TssInvocation $PSCmdlet.MyInvocation if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) { - . $CheckVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation + Compare-TssVersion $TssSession '10.9.000000' $PSCmdlet.MyInvocation $restResponse = $null $uri = $TssSession.ApiUrl, 'workflows', 'templates' -join '/' $uri = $uri, "sortBy[0].direction=asc&sortBy[0].name=$SortBy&take=$($TssSession.Take)" -join '?' diff --git a/src/parts/CheckVersion.ps1 b/src/parts/CheckVersion.ps1 deleted file mode 100644 index 1a2bf3d2..00000000 --- a/src/parts/CheckVersion.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -<# - .Synopsis - Validates Version of Secret Server - .Description - Validates version of Secret Server - Throws a message if detected version is lower than input (minimum) -#> -[cmdletbinding()] -param( - [Parameter(Mandatory,Position = 0)] - [Thycotic.PowerShell.Authentication.Session] - $TssSession, - - [Parameter(Mandatory,Position = 1)] - $MinimumSupported, - - [Parameter(Mandatory,Position = 2)] - [System.Management.Automation.InvocationInfo] - $Invocation -) -process { - if (-not $ignoreVersion -or (Test-Path variable:tss_ignoreversioncheck -and -not $tss_ignoreversioncheck)) { - $source = $Invocation.MyCommand - $currentVersion = $TssSession.SecretServerVersion - - if ($currentVersion -lt $MinimumSupported) { - Write-Verbose "[$source] is only supported on [$MinimumSupported]+ of Secret Server. Secret Server host [$($TssSession.SecretServer)] version: [$currentVersion]" - } - } -} \ No newline at end of file