I’ve got multiple complex pages in a dashboard that are split into separate .ps1 files. When I want saved changes to go live in production, I’d like to be able to schedule the restart of that single dashboard.
I’ve been attempting to write a script that will do so, but it’s not recognizing Get-Dashboard nor the -Name parameter on Stop-UDDashboard. Is it still possible to do this in newer versions? All documentation I’ve seen for these appear to be for 1.x.
[error] The term 'Get-UDDashboard' is not recognized as a name of a cmdlet, function, script file, or executable program. [error] A parameter cannot be found that matches parameter name 'Name'.
Dec 15, 2021 10:50 AM [warning] Failed to verify module and server version. Call failed. The SSL connection could not be established, see inner exception. GET https://localhost:443/api/v1/version
Dec 15, 2021 10:50 AM [warning] Failed to verify module and server version. Call failed. The SSL connection could not be established, see inner exception. GET https://localhost:443/api/v1/version
Dec 15, 2021 10:50 AM [error] Call failed. The SSL connection could not be established, see inner exception. GET https://localhost:443/api/v1/Dashboard
Dec 15, 2021 10:50 AM Attempting to stop dashboard...
Dec 15, 2021 10:50 AM [error] Cannot bind argument to parameter 'Dashboard' because it is null.
Dec 15, 2021 10:50 AM Successfully stopped the dashboard!
Dec 15, 2021 10:50 AM Attempting to restart dashboard...
Dec 15, 2021 10:50 AM Failed start dashboard: The term 'Start-UDDashboard' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
It appears Get-PSUDashboard doesn’t return anything, even without piping to Where-Object.
Dec 15, 2021 10:50 AM [error] Call failed. The SSL connection could not be established, see inner exception. GET https://localhost:443/api/v1/Dashboard
The other thing is that you can update the Api \ URL in appsettings.json. It’s using the wrong host name and that’s why this warning is present.
Dec 15, 2021 10:50 AM [warning] Failed to verify module and server version. Call failed. The SSL connection could not be established, see inner exception. GET https://localhost:443/api/v1/version