Skip to content

Commit 3a85c05

Browse files
author
Jason Shen (KATAL)
committed
Update Portal data PowerShell module for some deprecated information
1 parent 8033d5a commit 3a85c05

File tree

2 files changed

+6
-52
lines changed

2 files changed

+6
-52
lines changed

DatacenterIntegration/Portal/PortalUserDataGdprUtilities.psm1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ function Clear-AzsUserDataWithUserPrincipalName
128128
[pscredential] $AutomationCredential = $null
129129
)
130130

131+
Write-Warning "Please use PortalUserDataUtilities.psm1. This module is deprecated and will be deleted soon."
132+
131133
$params = @{
132134
AzsAdminDirectoryTenantId = $AzsAdminDirectoryTenantId
133135
AzsAdminArmEndpoint = $AzsAdminArmEndpoint
@@ -286,6 +288,8 @@ function Clear-AzsUserDataWithUserObjectId
286288
[pscredential] $AutomationCredential = $null
287289
)
288290

291+
Write-Warning "Please use PortalUserDataUtilities.psm1. This module is deprecated and will be deleted soon."
292+
289293
$ErrorActionPreference = 'Stop'
290294
$VerbosePreference = 'Continue'
291295

@@ -330,6 +334,8 @@ function Get-UserObjectId
330334
[pscredential] $AutomationCredential = $null
331335
)
332336

337+
Write-Warning "Please use PortalUserDataUtilities.psm1. This module is deprecated and will be deleted soon."
338+
333339
$params = @{
334340
AzsDirectoryTenantId = $DirectoryTenantId
335341
AzsArmEndpoint = $AzsArmEndpoint

DatacenterIntegration/Portal/PortalUserDataUtilities.psm1

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -128,57 +128,6 @@ function Clear-AzsUserDataWithUserPrincipalName
128128
[pscredential] $AutomationCredential = $null
129129
)
130130

131-
$params = @{
132-
AzsAdminDirectoryTenantId = $AzsAdminDirectoryTenantId
133-
AzsAdminArmEndpoint = $AzsAdminArmEndpoint
134-
UserPrincipalName = $UserPrincipalName
135-
}
136-
137-
if ($DirectoryTenantId) {
138-
$params.DirectoryTenantId = $DirectoryTenantId
139-
}
140-
141-
if ($AutomationCredential) {
142-
$params.AutomationCredential = $AutomationCredential
143-
}
144-
145-
Clear-AzsUserData @params
146-
}
147-
148-
<#
149-
.Synopsis
150-
Deprecated: Clear the portal user data
151-
#>
152-
function Clear-AzsUserData
153-
{
154-
param
155-
(
156-
# The directory tenant identifier of Azure Stack Administrator.
157-
[Parameter(Mandatory=$true)]
158-
[ValidateNotNullOrEmpty()]
159-
[string] $AzsAdminDirectoryTenantId,
160-
161-
# The Azure Stack ARM endpoint URI.
162-
[Parameter(Mandatory=$true)]
163-
[ValidateNotNullOrEmpty()]
164-
[Uri] $AzsAdminArmEndpoint,
165-
166-
# The user principal name of the account whoes user data should be cleared.
167-
[Parameter(Mandatory=$true)]
168-
[ValidateNotNullOrEmpty()]
169-
[string] $UserPrincipalName,
170-
171-
# Optional: The directory tenant identifier of account whoes user data should be cleared.
172-
# If it is not specified, it will delete user with principal name under all regitered directory tenants
173-
[Parameter(Mandatory=$false)]
174-
[ValidateNotNullOrEmpty()]
175-
[string] $DirectoryTenantId,
176-
177-
# Optional: A credential used to authenticate with Azure Stack. Must support a non-interactive authentication flow. If not provided, the script will prompt for user credentials.
178-
[ValidateNotNull()]
179-
[pscredential] $AutomationCredential = $null
180-
)
181-
182131
$ErrorActionPreference = 'Stop'
183132
$VerbosePreference = 'Continue'
184133

@@ -421,6 +370,5 @@ function Clear-SinglePortalUserData
421370
}
422371

423372
Export-ModuleMember -Function Get-UserObjectId
424-
Export-ModuleMember -Function Clear-AzsUserData
425373
Export-ModuleMember -Function Clear-AzsUserDataWithUserPrincipalName
426374
Export-ModuleMember -Function Clear-AzsUserDataWithUserObjectId

0 commit comments

Comments
 (0)