microsoft / SQLServerPSModule

This repo is the home of SQL Server PowerShell Module development.
MIT License
45 stars 1 forks source link

Help File not available online #50

Closed MallocArray closed 6 months ago

MallocArray commented 1 year ago

I also got tripped up with the new certificate errors when connecting to a standard SQL server.

I used get-help invoke-sqlcmd in Powershell 7 to read through new parameters and under TrustServerCertificate I saw the note

This parameter is new in v22 of the module. For more details, seeStrict Connection Encyptionunder Related Links (#related-links).

In the terminal of Powershell 7 I could see Related Links had something under it named "Strict Connection Encryption" but it wasn't a link I could click. I tried getting the online version of help but it didn't work

get-help invoke-sqlcmd -Online
Get-Help: The online version of this Help topic cannot be displayed because the Internet address (URI) of the Help topic is not specified in the command code or in the help file for 
the command.

How are we supposed to access this related link to get more details?

MallocArray commented 1 year ago

I was able to find the cmdlet reference after posting this, which would be helpful if they could link to this:

https://learn.microsoft.com/en-us/powershell/module/sqlserver/invoke-sqlcmd?view=sqlserver-ps

Matteo-T commented 1 year ago

Hi @mallocarray, I could be mistaken, but in the early days of the module I was told by the PS folks that there are two ways to deal with the documentation and, after some going back and forth, we decided to go with the current model which is: (1) ship the offline files -Help.xml with the module (2) have the ,md file for the online documentation on LEARN (3) leave the HelpInfoURI blank in the module manifest file.

However... it could be that all I need to do would be to make sure that the source .md files are populated with the online version: metadata and PlatyPS should just embed the link for the -Online option in the MAML file.

Let me experiment a little bit with that and see how far I can go.

Thanks much for the suggestion!

MallocArray commented 1 year ago

Thanks for checking into it. Another possible suggestion for what I was running into would be to include the actual link in the Related Links sections instead of just the text. On the website version, it links to external documentation, but when viewing it from the terminal, it isn't a clickable link, at least not in the Powershell terminal inside of VSCode.

RELATED LINKS
    SQLServer_Cmdlets
    Service Principal
    Managed Identity
    High Availability
    Provider Statistics for SQL Server
    Strict Connection Encyption

If this could also have the actual link itself, it would meet what I was looking for

RELATED LINKS
    SQLServer_Cmdlets
    Service Principal
    Managed Identity
    High Availability
    Provider Statistics for SQL Server
    Strict Connection Encyption (https://learn.microsoft.com/en-us/sql/relational-databases/security/networking/tds-8-and-tls-1-3?view=sql-server-ver16#strict-connection-encryption)

Note: Encryption is misspelled in the Learn site

Matteo-T commented 6 months ago

@MallocArray - I can check with our LEARN guys and see if they are willing to have be use absolute URIs. Generally speaking, I think the guideline is to avoid them as much as possible because they tend to break when things get moved around.

I'm taggin @markingmyname to keep me honest here. :)

I can at least fix the spelling problem, though!

Matteo-T commented 6 months ago

The part that adds the online version link is in PR: https://github.com/MicrosoftDocs/sql-docs-powershell/pull/109

Matteo-T commented 6 months ago

@MallocArray - I have an idea around your "other possible suggestion"... maybe I can implement it, without interfering with the online documentation...

Matteo-T commented 5 months ago

@MallocArray - v22.2.0 should have a fully functional Get-Help <cmdlet> -Online. When I do that, I the browser to open the right page.

Also, at the bottom of the help page (when you don't pass the -Online), you get this:

   ...

RELATED LINKS
    Online Version: https://learn.microsoft.com/powershell/module/sqlserver/invoke-sqlcmd
    SQLServer_Cmdlets
    ...