d365collaborative / d365fo.tools

Tools used for Dynamics 365 Finance and Operations
MIT License
250 stars 102 forks source link

Error when using Start-D365EnvironmentV2 #623

Closed VincentVerweij closed 1 year ago

VincentVerweij commented 2 years ago

I am receiving an error while using the new commandlet Start-D365EnvironmentV2. The services start correctly, but when they are started it throws an error.

image

Also there's a visual glitch. The output of the services when it is started is not shown as a table like the Start-D365Environment commandlet.

@Splaxi I will check the code and make a pull request if I did find the bug.

Splaxi commented 2 years ago

So you have 2 issues in the code, that could explain these things. Line 164 and Line 168.

  1. You piping your $temp to a select-object - which isn't formatted. https://github.com/d365collaborative/d365fo.tools/blob/e057a1f9a5c9c9af64fc44302e7b7f263a5a1263/d365fo.tools/functions/start-d365environmentv2.ps1#L164 What you should do is:
    #Line 164
    $Results = $temp | Select-Object @{Name = "Server"; Expression = { $ComputerName } }, Name, Status, StartType, DisplayName

    and then the error on line 168 is solved by that and the output will match the Start-D365Environment

Splaxi commented 2 years ago

The changes should be coming with the next release, hopefully today 🤞

FH-Inway commented 1 year ago

@Splaxi or @VincentVerweij I think this issue can be closed now.