Add default help content to the assets folder (#13257)

* Add default help content to the assets folder
* Reformatted and removed TechNet reference
This commit is contained in:
Aditya Patwardhan 2020-07-26 11:53:56 -07:00 committed by GitHub
parent cfb1952fd2
commit f91e78ad69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 121 additions and 9 deletions

108
assets/default.help.txt Normal file
View File

@ -0,0 +1,108 @@
TOPIC
PowerShell Help System
SHORT DESCRIPTION
Displays help about PowerShell cmdlets and concepts.
LONG DESCRIPTION
PowerShell Help describes PowerShell cmdlets, functions, scripts, and
modules, and explains concepts, including the elements of the PowerShell
language.
PowerShell does not include help files, but you can read the help topics
online, or use the Update-Help cmdlet to download help files to your
computer and then use the Get-Help cmdlet to display the help topics at
the command line.
You can also use the Update-Help cmdlet to download updated help files
as they are released so that your local help content is never obsolete.
Without help files, Get-Help displays auto-generated help for cmdlets,
functions, and scripts.
ONLINE HELP
You can find help for PowerShell online at
https://go.microsoft.com/fwlink/?LinkID=108518.
To open online help for any cmdlet or function, type:
Get-Help <cmdlet-name> -Online
UPDATE-HELP
To download and install help files on your computer:
1. Start PowerShell with the "Run as administrator" option.
2. Type:
Update-Help
After the help files are installed, you can use the Get-Help cmdlet to
display the help topics. You can also use the Update-Help cmdlet to
download updated help files so that your local help files are always
up-to-date.
For more information about the Update-Help cmdlet, type:
Get-Help Update-Help -Online
or go to: https://go.microsoft.com/fwlink/?LinkID=210614
GET-HELP
The Get-Help cmdlet displays help at the command line from content in
help files on your computer. Without help files, Get-Help displays basic
help about cmdlets and functions. You can also use Get-Help to display
online help for cmdlets and functions.
To get help for a cmdlet, type:
Get-Help <cmdlet-name>
To get online help, type:
Get-Help <cmdlet-name> -Online
The titles of conceptual topics begin with "About_". To get help for a
concept or language element, type:
Get-Help About_<topic-name>
To search for a word or phrase in all help files, type:
Get-Help <search-term>
For more information about the Get-Help cmdlet, type:
Get-Help Get-Help -Online
or go to: https://go.microsoft.com/fwlink/?LinkID=113316
EXAMPLES:
Save-Help : Download help files from the internet and save
them on a file share.
Update-Help : Downloads and installs help files from the
internet or a file share.
Get-Help Get-Process : Displays help about the Get-Process cmdlet.
Get-Help Get-Process -Online
: Opens online help for the Get-Process cmdlet.
Help Get-Process : Displays help about Get-Process one page at a
time.
Get-Process -? : Displays help about the Get-Process cmdlet.
Get-Help About_Modules : Displays help about PowerShell modules.
Get-Help remoting : Searches the help topics for the word "remoting."
SEE ALSO:
about_Updatable_Help
Get-Help
Save-Help
Update-Help

View File

@ -6,7 +6,6 @@
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="powershell_nuget" value="https://powershell.pkgs.visualstudio.com/PowerShell/_packaging/powershell/nuget/v3/index.json" />
<add key="powershell-core" value="https://powershell.myget.org/F/powershell-core/api/v3/index.json" />
<add key="PSGallery" value="https://www.powershellgallery.com/api/v2/" />
</packageSources>
</configuration>

View File

@ -32,14 +32,15 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Include="..\..\assets\default.help.txt">
<Link>en-US\default.help.txt</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.PowerShell.SDK\Microsoft.PowerShell.SDK.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="PowerShellHelpFiles" Version="1.0.0-*" />
</ItemGroup>
</Project>

View File

@ -49,6 +49,11 @@
<Link>preview\pwsh-preview.cmd</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\assets\default.help.txt">
<Link>en-US\default.help.txt</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
<ItemGroup>
@ -59,8 +64,4 @@
<ProjectReference Include="..\Microsoft.Management.UI.Internal\Microsoft.PowerShell.GraphicalHost.csproj" Condition="'$(SDKToUse)' == 'Microsoft.NET.Sdk.WindowsDesktop' "/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="PowerShellHelpFiles" Version="1.0.0-*" />
</ItemGroup>
</Project>

View File

@ -208,6 +208,9 @@ function Start-PSPackage {
# Copy the ThirdPartyNotices.txt so it's part of the package
Copy-Item "$RepoRoot/ThirdPartyNotices.txt" -Destination $Source -Force
# Copy the default.help.txt so it's part of the package
Copy-Item "$RepoRoot/assets/default.help.txt" -Destination "$Source/en-US" -Force
# If building a symbols package, we add a zip of the parent to publish
if ($IncludeSymbols.IsPresent)
{