Skip to content

Az.DevCenter - Deleting a Dev Box from another user without the UserId doesn't do anything. It should fail. #28802

@RogerBestMsft

Description

@RogerBestMsft

Description

Using the Remove-AzDevCenterUserDevBox as a project admin to remove a Dev Box of another user does remove the box and doesn't return an error.

Issue script & Debug output

Script: 
# PowerShell script to delete an Azure Dev Box
# Requires Az.DevCenter PowerShell module

param(
    [Parameter(Mandatory=$false)]
    [string]$DevBoxName = "",
    
    [Parameter(Mandatory=$false)]
    [string]$ProjectName = "",
    
    [Parameter(Mandatory=$false)]
    [string]$UserId = "",
    
    [Parameter(Mandatory=$false)]
    [string]$DevCenterName = "",
    
    [Parameter(Mandatory=$false)]
    [string]$DevCenterEndpoint = ""
)

# Import required modules
Import-Module Az.Accounts -Force
Import-Module Az.DevCenter -Force

try {
    # Delete the Dev Box
    Write-Host "Deleting Dev Box '$DevBoxName'..." -ForegroundColor Yellow
    Remove-AzDevCenterUserDevBox -DevCenterName $DevCenterName -ProjectName $ProjectName -UserId $UserId -Name $DevBoxName -Debug
    
    Write-Host "Dev Box '$DevBoxName' has been successfully deleted." -ForegroundColor Green
}
catch {
    Write-Error "An error occurred: $($_.Exception.Message)"
    exit 1
}
# PowerShell script to delete an Azure Dev Box
# Requires Az.DevCenter PowerShell module

param(
    [Parameter(Mandatory=$false)]
    [string]$DevBoxName = "",
    
    [Parameter(Mandatory=$false)]
    [string]$ProjectName = "",
    
    [Parameter(Mandatory=$false)]
    [string]$UserId = "",
    
    [Parameter(Mandatory=$false)]
    [string]$DevCenterName = "",
    
    [Parameter(Mandatory=$false)]
    [string]$DevCenterEndpoint = ""
)

# Import required modules
Import-Module Az.Accounts -Force
Import-Module Az.DevCenter -Force

try {
    # Delete the Dev Box
    Write-Host "Deleting Dev Box '$DevBoxName'..." -ForegroundColor Yellow
    Remove-AzDevCenterUserDevBox -DevCenterName $DevCenterName -ProjectName $ProjectName -UserId $UserId -Name $DevBoxName -Debug
    
    Write-Host "Dev Box '$DevBoxName' has been successfully deleted." -ForegroundColor Green
}
catch {
    Write-Error "An error occurred: $($_.Exception.Message)"
    exit 1
}
Output:
 C:\Experiments\DevBoxDelete> .\delete-devbox.ps1                                                                                                               
DEBUG: Initializing ConditionalAssemblyContext. PSEdition is [Core]. PSVersion is [7.5.4].
DEBUG: Initializing ConditionalAssemblyProvider. AssemblyRootPath is [C:\Users\rbest\Documents\PowerShell\Modules\Az.Accounts\5.3.0\StartupScripts\..\lib].
DEBUG: Registering Az shared AssemblyLoadContext.
DEBUG: AssemblyLoadContext registered.
DEBUG: Initializing PSStyle.
Deleting Dev Box 'fifthvm'...
WARNING: Upcoming breaking changes in the cmdlet 'Remove-AzDevCenterUserDevBox' :
- The output type is changing from the existing type :'OperationStatus' to the new type :'OperationStatus'
- The following properties in the output type are being deprecated : 'Property'
- The following properties are being added to the output type : 'Property'
- This change will take effect on '11/18/2025'- The change is expected to take effect from Az version : '15.0.0'
- The change is expected to take effect from version : '3.0.0'
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: 9:38:23 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 9:38:23 AM - SearchAzureRmGraph begin processing with ParameterSet 'SubscriptionScopedQuery'.
DEBUG: 9:38:23 AM - using account id 'rbest@rbestfoxtrot.onmicrosoft.com'...
DEBUG: 9:38:23 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [Az.ResourceGraph], Cmdlet = [Search-AzGraph]. Returning default value [True].
DEBUG: [Common.Authentication]: Authenticating using Account: 'rbest@rbestfoxtrot.onmicrosoft.com', environment: 'AzureCloud', tenant: '<devcenterid>'
DEBUG: 9:38:23 AM - [ConfigManager] Got nothing from [DisableInstanceDiscovery], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 9:38:23 AM - [ConfigManager] Got [False] from [EnableLoginByWam], Module = [], Cmdlet = [].
DEBUG: 9:38:23 AM - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'<devcenterid>', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'rbest@rbestfoxtrot.onmicrosoft.com'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: 
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z] [Internal cache] Clearing user token cache accessor.
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z] [Internal cache] Total number of cache partitions found while getting refresh tokens: 2
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - ebfa9c26-c15a-4538-846f-0c84ecf8fe24] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - ebfa9c26-c15a-4538-846f-0c84ecf8fe24] [Region discovery] Not using a regional authority. 
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - ebfa9c26-c15a-4538-846f-0c84ecf8fe24] [Region discovery] Not using a regional authority. 
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - ebfa9c26-c15a-4538-846f-0c84ecf8fe24] [Region discovery] Not using a regional authority. 
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - ebfa9c26-c15a-4538-846f-0c84ecf8fe24] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - ebfa9c26-c15a-4538-846f-0c84ecf8fe24] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z] Found 2 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z] Returning 2 accounts
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] MSAL MSAL.CoreCLR with assembly version '4.65.0.0'. CorrelationId(fefae307-9b64-4f22-a2d9-d22e54904e06)
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] LoginHint provided: False
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] Account provided: True
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] ForceRefresh: False
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] 
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) - 
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - fefae307-9b64-4f22-a2d9-d22e54904e06
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured: 

DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] === Token Acquisition (SilentRequest) started:
         Scopes: https://management.core.windows.net//.default
        Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z] [Internal cache] Clearing user token cache accessor.      
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] [Internal cache] Total number of cache partitions found while getting access tokens: 2
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] [FindAccessTokenAsync] Discovered 5 access tokens in cache using partition key: f3ff0803-904c-4cb5-ae46-727dd399f780.<devcenterid>
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] [Region discovery] Not using a regional authority. 
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] Access token is not expired. Returning the found cache entry. [Current time (11/04/2025 17:38:23) - Expiration Time (11/04/2025 18:40:30 +00:00) - Extended Expiration Time (11/04/2025 18:40:30 +00:00)]
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] [Region discovery] Not using a regional authority. 
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] 
        === Token Acquisition finished successfully:
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06]  AT expiration time: 11/4/2025 6:40:30 PM +00:00, scopes: https://management.core.windows.net//.default https://management.core.windows.net//user_impersonation. source: Cache       
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] 
[LogMetricsFromAuthResult] Cache Refresh Reason: NotApplicable
[LogMetricsFromAuthResult] DurationInCacheInMs: 0
[LogMetricsFromAuthResult] DurationTotalInMs: 2
[LogMetricsFromAuthResult] DurationInHttpInMs: 0
DEBUG: False MSAL 4.65.0.0 MSAL.CoreCLR .NET 9.0.10 Microsoft Windows 10.0.26200 [2025-11-04 17:38:23Z - fefae307-9b64-4f22-a2d9-d22e54904e06] TokenEndpoint: ****
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:  ExpiresOn: 2025-11-04T18:40:30.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '<devcenterid>', UserId: 'rbest@rbestfoxtrot.onmicrosoft.com'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2024-04-01

Headers:
Accept-Language               : en-US
x-ms-client-request-id        : 37248e1b-2b69-465c-a68c-7fbeecf7ce34

Body:
{
  "subscriptions": [
    "<subscriptionid>"
  ],
  "query": "Resources |where type =~'Microsoft.devcenter/projects' | where name =~ 'TestAManualDC' | extend devCenterArr = split(properties.devCenterId, '/') | extend devCenterName = devCenterArr[array_length(devCenterArr) -1]  | where devCenterName =~ 'ManualDC' | take 1 | extend devCenterUri = properties.devCenterUri | project devCenterUri",
  "options": {
    "$top": 100,
    "$skip": 0,
    "resultFormat": "objectArray",
    "allowPartialScopes": false
  }
}


DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-correlation-request-id   : 5cf4f499-b9a1-42b6-bbb2-2b1286ea7a17
x-ms-ratelimit-remaining-tenant-resource-requests: 14
x-ms-user-quota-remaining     : 14
x-ms-user-quota-resets-after  : 00:00:04
x-ms-resource-graph-request-duration: 0:00:00:00.3103914
x-ms-operation-identifier     : 
x-ms-ratelimit-remaining-tenant-reads: 249
x-ms-request-id               : 5cf4f499-b9a1-42b6-bbb2-2b1286ea7a17
x-ms-routing-request-id       : WESTUS2:20251104T173823Z:5cf4f499-b9a1-42b6-bbb2-2b1286ea7a17
X-Content-Type-Options        : nosniff
X-Cache                       : CONFIG_NOCACHE
X-MSEdge-Ref                  : Ref A: A1FA581E5D9D4C3182BA8DFE7F54A427 Ref B: MWH011020809023 Ref C: 2025-11-04T17:38:22Z
Date                          : Tue, 04 Nov 2025 17:38:22 GMT

Body:
{
  "totalRecords": 1,
  "count": 1,
  "data": [
    {
      "devCenterUri": "https://<devcenterid>-manualdc.centralus.devcenter.azure.com/"
    }
  ],
  "facets": [],
  "resultTruncated": "false"
}


DEBUG: 9:38:23 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 9:38:23 AM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 9:38:23 AM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 9:38:23 AM - SearchAzureRmGraph end processing.
DEBUG: [CmdletBeginProcessing]: Starting command
DEBUG: CmdletBeginProcessing: 
DEBUG: CmdletProcessRecordStart: 

Confirm
Are you sure you want to perform this action?
Performing the operation "Remove-AzDevCenterUserDevBox_Delete" on target "Call remote 'DevBoxesDeleteDevBox' operation".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: CmdletGetPipeline: 
DEBUG: CmdletBeforeAPICall: 
DEBUG: URLCreated: /projects/TestAManualDC/users/me/devboxes/fifthvm?api-version=2024-05-01-preview
DEBUG: RequestCreated: /projects/TestAManualDC/users/me/devboxes/fifthvm?api-version=2024-05-01-preview
DEBUG: HeaderParametersAdded: 
DEBUG: 9:38:29 AM - [ConfigManager] Got nothing from [DisableInstanceDiscovery], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
DELETE

Absolute Uri:
https://<devcenterid>-manualdc.centralus.devcenter.azure.com/projects/TestAManualDC/users/me/devboxes/fifthvm?api-version=2024-05-01-preview

Headers:
x-ms-client-request-id        : 4074d768-1017-4672-95b8-c985dfc7ba6f
CommandName                   : Az.DevCenterdata.internal\Remove-AzDevCenterUserDevBox
FullCommandName               : Remove-AzDevCenterUserDevBox_Delete
ParameterSetName              : __AllParameterSets
User-Agent                    : AzurePowershell/v14.5.0,PSVersion/v7.5.4,Az.DevCenterdata/2.0.1

Body:



DEBUG: 9:38:29 AM - [ConfigManager] Got [False] from [EnableLoginByWam], Module = [], Cmdlet = [].
DEBUG: BeforeCall: 
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NoContent

Headers:
Date                          : Tue, 04 Nov 2025 17:38:29 GMT
Connection                    : keep-alive
x-ms-correlation-request-id   : dd8bea85-8d13-413b-b444-fd9702fe7805
x-ms-client-request-id        : 4074d768-1017-4672-95b8-c985dfc7ba6f
X-Rate-Limit-Limit            : 1m
X-Rate-Limit-Remaining        : 999
X-Rate-Limit-Reset            : 2025-11-04T17:39:29.7029250Z
Strict-Transport-Security     : max-age=31536000; includeSubDomains
Access-Control-Allow-Origin   : *
Access-Control-Max-Age        : 86400
Access-Control-Expose-Headers : Location,Operation-Location,x-ms-correlation-request-id,x-ms-client-request-id

Body:



DEBUG: ResponseCreated: 
DEBUG: BeforeResponseDispatch: 
DEBUG: Finally: 
DEBUG: CmdletAfterAPICall: 
DEBUG: [CmdletProcessRecordAsyncEnd]: Finish HTTP process
DEBUG: CmdletProcessRecordAsyncEnd: 
DEBUG: CmdletProcessRecordEnd: 
DEBUG: 9:38:30 AM - [ConfigManager] Got nothing from [EnableDataCollection], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: AzureQoSEvent:  Module: Az.DevCenter:2.0.2; CommandName: Remove-AzDevCenterUserDevBox; PSVersion: 7.5.4; IsSuccess: True; Duration: 00:00:12.7948561; SanitizeDuration: 00:00:00
Dev Box 'fifthvm' has been successfully deleted.
PS C:\Experiments\DevBoxDelete>

Environment data

Name                           Value
----                           -----
PSVersion                      7.5.4
PSEdition                      Core
GitCommitId                    7.5.4
OS                             Microsoft Windows 10.0.26200
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     5.3.0                 Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     2.0.2                 Az.DevCenter                        {Connect-AzDevCenterAdminCatalog, Connect-AzDevCenterAdminProjectCatalog, Deploy-AzDevCente…
Script     1.2.1                 Az.ResourceGraph                    {Search-AzGraph, Get-AzResourceGraphQuery, New-AzResourceGraphQuery, Remove-AzResourceGraph

Error output

C:\Experiments\DevBoxDelete> Resolve-AzError                                                                                                                   
DEBUG: 9:45:50 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 9:45:50 AM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 9:45:50 AM - using account id 'rbest@rbestfoxtrot.onmicrosoft.com'...
DEBUG: 9:45:50 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [Az.Accounts], Cmdlet = [Resolve-AzError]. Returning default value [True].
DEBUG: 9:45:50 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].

   HistoryId: 29

Message        : [DevBoxNotFound] : The dev box resource was not found.
StackTrace     : 
Exception      : System.Exception
InvocationInfo : {Start-AzDevCenterUserDevBox_Start}
Line           :     Az.DevCenterdata.internal\Start-AzDevCenterUserDevBox @PSBoundParameters

Position       : At C:\Users\rbest\Documents\PowerShell\Modules\Az.DevCenter\2.0.2\DevCenterData.AutoRest\custom\Start-AzDevCenterUserDevBox.ps1:186 char:5       
                 +     Az.DevCenterdata.internal\Start-AzDevCenterUserDevBox @PSBoundPar+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 29

DEBUG: 9:45:51 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].

   HistoryId: 23

Message        : A parameter cannot be found that matches parameter name 'Force'.
StackTrace     :    at System.Management.Automation.CmdletParameterBinderController.VerifyArgumentsProcessed(ParameterBindingException originalBindingException)  
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
                    at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
                    at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                 --- End of stack trace from previous location ---
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements,      
                 CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ParameterBindingException
InvocationInfo : {Remove-AzDevCenterUserDevBox}
Line           : Remove-AzDevCenterUserDevBox -DevCenterName "ManualDC"  -ProjectName "WingIt_Project" -DevBoxName "WingIt1" -Force
Position       : At line:1 char:109
                 + … ManualDC"  -ProjectName "WingIt_Project" -DevBoxName "WingIt1" -Force
                 +                                                                  ~~~~~~
HistoryId      : 23

DEBUG: 9:45:51 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].

   HistoryId: 20

Message        : A positional parameter cannot be found that accepts argument '\'.
StackTrace     :    at System.Management.Automation.CmdletParameterBinderController.VerifyArgumentsProcessed(ParameterBindingException originalBindingException)  
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
                    at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
                    at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                 --- End of stack trace from previous location ---
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements,      
                 CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ParameterBindingException
InvocationInfo : {Get-AzDevCenterUserDevBox}
Line           : Get-AzDevCenterUserDevBox -DevCenterName "ManualDC"\
Position       : At line:1 char:1
                 + Get-AzDevCenterUserDevBox -DevCenterName "ManualDC"\
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 20

DEBUG: 9:45:51 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].

   HistoryId: 15

Message        : A parameter cannot be found that matches parameter name 'Force'.
StackTrace     :    at System.Management.Automation.CmdletParameterBinderController.VerifyArgumentsProcessed(ParameterBindingException originalBindingException)  
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
                    at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
                    at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                 --- End of stack trace from previous location ---
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements,      
                 CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ParameterBindingException
InvocationInfo : {Remove-AzDevCenterUserDevBox}
Line           : Remove-AzDevCenterUserDevBox -DevCenterName "ManualDC"  -ProjectName "WingIt_Project" -DevBoxName "tests" -Force
Position       : At line:1 char:107
                 + …  "ManualDC"  -ProjectName "WingIt_Project" -DevBoxName "tests" -Force
                 +                                                                  ~~~~~~
HistoryId      : 15

DEBUG: 9:45:51 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].

   HistoryId: 12

Message        : No project 'WingIt_Project' was found in the dev center 'ManuaulDC' under the current tenant '<devcenter id>'. Please      
                 contact your admin to gain access to specific projects or use a different tenant where you have access to projects.
StackTrace     : 
Exception      : Microsoft.PowerShell.Commands.WriteErrorException
InvocationInfo : {GetEndpointFromResourceGraph}
Line           :       $Endpoint = GetEndpointFromResourceGraph -DevCenterName $DevCenterName -Project $ProjectName

Position       : At C:\Users\rbest\Documents\PowerShell\Modules\Az.DevCenter\2.0.2\DevCenterData.AutoRest\custom\Remove-AzDevCenterUserDevBox.ps1:182 char:19     
                 + … $Endpoint = GetEndpointFromResourceGraph -DevCenterName $DevCenterNam
                 +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 12

DEBUG: 9:45:51 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].

   HistoryId: 10

Message        : No project 'WingIt_Project' was found in the dev center 'ManuaulDC' under the current tenant '<devcenter id>'. Please      
                 contact your admin to gain access to specific projects or use a different tenant where you have access to projects.
StackTrace     : 
Exception      : Microsoft.PowerShell.Commands.WriteErrorException
InvocationInfo : {GetEndpointFromResourceGraph}
Line           :       $Endpoint = GetEndpointFromResourceGraph -DevCenterName $DevCenterName -Project $ProjectName

Position       : At C:\Users\rbest\Documents\PowerShell\Modules\Az.DevCenter\2.0.2\DevCenterData.AutoRest\custom\Remove-AzDevCenterUserDevBox.ps1:182 char:19     
                 + … $Endpoint = GetEndpointFromResourceGraph -DevCenterName $DevCenterNam
                 +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 10

DEBUG: 9:45:51 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].

   HistoryId: 9

Message        : No project 'WingItPool' was found in the dev center 'ManuaulDC' under the current tenant '<devcenter id>'. Please contact  
                 your admin to gain access to specific projects or use a different tenant where you have access to projects.
StackTrace     : 
Exception      : Microsoft.PowerShell.Commands.WriteErrorException
InvocationInfo : {GetEndpointFromResourceGraph}
Line           :       $Endpoint = GetEndpointFromResourceGraph -DevCenterName $DevCenterName -Project $ProjectName

Position       : At C:\Users\rbest\Documents\PowerShell\Modules\Az.DevCenter\2.0.2\DevCenterData.AutoRest\custom\Remove-AzDevCenterUserDevBox.ps1:182 char:19     
                 + … $Endpoint = GetEndpointFromResourceGraph -DevCenterName $DevCenterNam
                 +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 9

DEBUG: 9:45:51 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].

   HistoryId: 8

Message        : A parameter cannot be found that matches parameter name 'Force'.
StackTrace     :    at System.Management.Automation.CmdletParameterBinderController.VerifyArgumentsProcessed(ParameterBindingException originalBindingException)  
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
                    at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
                    at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                 --- End of stack trace from previous location ---
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements,      
                 CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ParameterBindingException
InvocationInfo : {Remove-AzDevCenterUserDevBox}
Line           : Remove-AzdevCenterUserDevBox -DevCenterName "ManuaulDC"  -ProjectName "WingItPool" -DevBoxName "tests" -Force
Position       : At line:1 char:104
                 + … ame "ManuaulDC"  -ProjectName "WingItPool" -DevBoxName "tests" -Force
                 +                                                                  ~~~~~~
HistoryId      : 8

DEBUG: 9:45:51 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].

   HistoryId: 7

Message        : A parameter cannot be found that matches parameter name 'Force'.
StackTrace     :    at System.Management.Automation.CmdletParameterBinderController.VerifyArgumentsProcessed(ParameterBindingException originalBindingException)  
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
                    at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
                    at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
                    at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
                    at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                 --- End of stack trace from previous location ---
                    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
                    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements,      
                 CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception      : System.Management.Automation.ParameterBindingException
InvocationInfo : {Remove-AzDevCenterUserDevBox}
Line           : Remove-AzdevCenterUserDevBox -Endpoint "https://<devcenter id>-manualdc.centralus.devcenter.azure.com/" -ProjectName       
                 "WingItPool" -DevBoxName "tests" -Force
Position       : At line:1 char:173
                 + … nter.azure.com/" -ProjectName "WingItPool" -DevBoxName "tests" -Force
                 +                                                                  ~~~~~~
HistoryId      : 7



DEBUG: 9:45:51 AM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 9:45:51 AM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 9:45:51 AM - No authentication telemetry is found for the current cmdlet with Id 84261e20-f0a5-4628-b86b-3250172507fc.
DEBUG: AzureQoSEvent:  Module: Az.Accounts:5.3.0; CommandName: Resolve-AzError; PSVersion: 7.5.4; IsSuccess: True; Duration: 00:00:00.2809792; SanitizeDuration: 00:00:00.0014057
DEBUG: 9:45:51 AM - [ConfigManager] Got nothing from [EnableDataCollection], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 9:45:51 AM - ResolveError end processing.
PS C:\Experiments\DevBoxDelete>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Dev Centerdev boxService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions