Question

We have local installation of AzurePack: ServiceBus 1.1 (wpi alias ServiceBus_1_1)

We need to add new namespace to ServiceBus on application deployment.

Here is code that I try to execute from one server:

Invoke-Command -ComputerName some-remote-server -Verbose -ScriptBlock { New-SBNamespace -Name new-sb-namespace -ManageUsers {domain}\{user} }

Here is a response that I receive:

The user name '{domain}\{user}' is invalid.
+ CategoryInfo          : NotSpecified: (vgl:String) [New-SBNamespace], ArgumentException
+ FullyQualifiedErrorId : InvalidUserName,Microsoft.ServiceBus.Commands.NewSBNamespaceCommand
+ PSComputerName        : some-remote-server

I can execute New-SBNamespace -Name new-sb-namespace -ManageUsers {domain}\{user} locally on remote server without any problems

I have tried different combinations of domain/user, different accounts. I can't find any information about why I receive this error.

Same error I'm getting when use Enter-PSSession command and execute New-SBNamespace

Was it helpful?

Solution

I have found a solution. Using -Authentication Credssp -Credential $credentials have solved issue, but caused a need to supply those credentials in script.

OTHER TIPS

Can you try

Invoke-Command -ComputerName some-remote-server -Verbose -ScriptBlock { New-SBNamespace -Name new-sb-namespace -ManageUsers {user}@{domain}

So the notation of users/groups should be user@domain

Hope this helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top