Categories
Azure DevOps Microsoft PowerShell

DevOps Deployment Group script stuck on “Connecting to the server.”

Scenario:
I’m adding a machine to a Deployment Group in DevOps, I copied the script from DevOps page and pasted in Windows PowerShell ISE that I’m running as Administrator in the target machine.

Run the script, it starts showing the steps until it stops (no errors shown) at the step

Connecting to the server.

Solution:
Run the script using Windows PowerShell (Run as Administrator) rather than using Windows PowerShell ISE

Did my solution solve your problem? Leave a reply.

6 replies on “DevOps Deployment Group script stuck on “Connecting to the server.””

I’m getting following error when i paste the script in Powershell as admin:

At line:1 char:179
+ … Current() ).IsInRole( [Security.Principal.WindowsBuiltInRole] Adminis …
+ ~
Missing ‘)’ in method call.
At line:1 char:180
+ … InRole( [Security.Principal.WindowsBuiltInRole] Administrator)){ thro …
+ ~~~~~~~~~~~~~
Unexpected token ‘Administrator’ in expression or statement.
At line:1 char:180
+ … InRole( [Security.Principal.WindowsBuiltInRole] Administrator)){ thro …
+ ~~~~~~~~~~~~~
Missing closing ‘)’ after expression in ‘If’ statement.
At line:1 char:193
+ … nRole( [Security.Principal.WindowsBuiltInRole] Administrator)){ throw …
+ ~
Unexpected token ‘)’ in expression or statement.
At line:1 char:194
+ … Role( [Security.Principal.WindowsBuiltInRole] Administrator)){ throw …
+ ~
Unexpected token ‘)’ in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingEndParenthesisInMethodCall

When you paste the command check for the Quotations in Administrator at Line1, Char 180, it will be missed, go and enter open and close Quotations manually.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.