Skip to content

Commit

Permalink
Merge pull request #282 from MicrosoftDocs/main
Browse files Browse the repository at this point in the history
12/12/2024 PM Publish
  • Loading branch information
Taojunshen authored Dec 12, 2024
2 parents f23ec72 + 747531c commit 4f29fa3
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: How to create an agent for Ollama
description: Learn how to create an agent for the Ollama language model in AI Shell.
ms.date: 11/18/2024
ms.date: 12/12/2024
ms.topic: how-to
---

Expand Down Expand Up @@ -497,6 +497,6 @@ in the `agents` folder of the base directory of `aish.exe`, the agent will be lo
[01]: https://github.com/ollama/ollama
[02]: https://github.com/ollama/ollama/blob/main/docs/api.md#request-no-streaming
[03]: https://github.com/PowerShell/ProjectMercury/discussions/categories/agent-sharing
[04]: https://github.com/PowerShell/ProjectMercury/shell/agents/AIShell.Ollama.Agent
[05]: https://github.com/PowerShell/ProjectMercury/shell/README.md
[04]: https://github.com/PowerShell/AIShell/tree/main/shell/agents/AIShell.Ollama.Agent
[05]: https://github.com/PowerShell/AIShell/blob/main/shell/README.md
[06]: https://www.nuget.org/packages/AIShell.Abstraction/1.0.0-preview.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Avoid overwriting built in cmdlets
ms.date: 06/28/2023
ms.date: 12/12/2024
ms.topic: reference
title: AvoidOverwritingBuiltInCmdlets
---
Expand All @@ -14,7 +14,7 @@ This rule flags cmdlets that are available in a given edition/version of PowerSh
operating system which are overwritten by a function declaration. It works by comparing function
declarations against a set of allowlists that ship with PSScriptAnalyzer. These allowlist files are
used by other PSScriptAnalyzer rules. More information can be found in the documentation for the
[UseCompatibleCmdlets](./UseCompatibleCmdlets.md) rule.
[UseCompatibleCmdlets][01] rule.

## Configuration

Expand All @@ -37,14 +37,17 @@ following your settings file.

The parameter `PowerShellVersion` is a list of allowlists that ship with PSScriptAnalyzer.

**Note**: The default value for `PowerShellVersion` is `core-6.1.0-windows` if PowerShell 6 or
later is installed, and `desktop-5.1.14393.206-windows` if it is not.
> [!NOTE]
> The default value for `PowerShellVersion` is `core-6.1.0-windows` if PowerShell 6 or
> later is installed, and `desktop-5.1.14393.206-windows` if it's not.
Usually, patched versions of PowerShell have the same cmdlet data, therefore only settings of major
and minor versions of PowerShell are supplied. One can also create a custom settings file as well
with the
[New-CommandDataFile.ps1](https://github.com/PowerShell/PSScriptAnalyzer/blob/development/Utils/New-CommandDataFile.ps1)
script and use it by placing the created `JSON` into the `Settings` folder of the `PSScriptAnalyzer`
module installation folder, then the `PowerShellVersion` parameter is just its file name (that can
also be changed if desired). Note that the `core-6.0.2-*` files were removed in PSScriptAnalyzer
1.18 since PowerShell 6.0 reached end of life.
with the [New-CommandDataFile.ps1][02] script and use it by placing the created `JSON` into the
`Settings` folder of the `PSScriptAnalyzer` module installation folder, then the `PowerShellVersion`
parameter is just its filename (that can also be changed if desired). Note that the `core-6.0.2-*`
files were removed in PSScriptAnalyzer 1.18 since PowerShell 6.0 reached end of life.

<!-- link references -->
[01]: ./UseCompatibleCmdlets.md
[02]: https://github.com/PowerShell/PSScriptAnalyzer/blob/main/Utils/New-CommandDataFile.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Use compatible cmdlets
ms.date: 06/28/2023
ms.date: 12/12/2024
ms.topic: reference
title: UseCompatibleCmdlets
---
Expand All @@ -10,8 +10,8 @@ title: UseCompatibleCmdlets

## Description

This rule flags cmdlets that are not available in a given Edition/Version of PowerShell on a given
Operating System. It works by comparing a cmdlet against a set of allowlists which ship with
This rule flags cmdlets that aren't available in a given Edition and Version of PowerShell on a
given Operating System. It works by comparing a cmdlet against a set of allowlists which ship with
PSScriptAnalyzer. They can be found at `/path/to/PSScriptAnalyzerModule/Settings`. These files are
of the form, `<psedition>-<psversion>-<os>.json` where `<psedition>` can be either `Core` or
`Desktop`, `<os>` can be either `Windows`, `Linux` or `MacOS`, and `<psversion>` is the PowerShell
Expand Down Expand Up @@ -41,7 +41,10 @@ The parameter `compatibility` is a list that contain any of the following

Usually, patched versions of PowerShell have the same cmdlet data, therefore only settings of major
and minor versions of PowerShell are supplied. You can also create a custom settings file with the
[New-CommandDataFile.ps1](https://github.com/PowerShell/PSScriptAnalyzer/blob/development/Utils/New-CommandDataFile.ps1)
script. Place the created `.json` file in the `Settings` folder of the `PSScriptAnalyzer` module
folder. Then the `compatibility` parameter values is just the filename. Note that the `core-6.0.2-*`
files were removed in PSScriptAnalyzer 1.18 since PowerShell 6.0 reached it's end of life.
[New-CommandDataFile.ps1][01] script. Place the created `.json` file in the `Settings` folder of the
`PSScriptAnalyzer` module folder. Then the `compatibility` parameter values is just the filename.
Note that the `core-6.0.2-*` files were removed in PSScriptAnalyzer 1.18 since PowerShell 6.0
reached it's end of life.

<!-- link references -->
[01]: https://github.com/PowerShell/PSScriptAnalyzer/blob/main/Utils/New-CommandDataFile.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Use compatible commands
ms.date: 10/10/2024
ms.date: 12/12/2024
ms.topic: reference
title: UseCompatibleCommands
---
Expand Down Expand Up @@ -141,5 +141,5 @@ And also suppressed only for parameters:
```

<!-- link references -->
[01]: https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector
[02]: https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector/optional_profiles
[01]: https://github.com/PowerShell/PSScriptAnalyzer/tree/main/PSCompatibilityCollector
[02]: https://github.com/PowerShell/PSScriptAnalyzer/tree/main/PSCompatibilityCollector/optional_profiles
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Use compatible types
ms.date: 10/10/2024
ms.date: 12/12/2024
ms.topic: reference
title: UseCompatibleTypes
---
Expand Down Expand Up @@ -161,5 +161,5 @@ And also suppressed only for type members:
```

<!-- link references -->
[01]: https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector
[02]: https://github.com/PowerShell/PSScriptAnalyzer/tree/development/PSCompatibilityCollector/optional_profiles
[01]: https://github.com/PowerShell/PSScriptAnalyzer/tree/main/PSCompatibilityCollector
[02]: https://github.com/PowerShell/PSScriptAnalyzer/tree/main/PSCompatibilityCollector/optional_profiles
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Using PlatyPS is the fast and efficient way to create XML-based help.
ms.date: 05/21/2024
ms.date: 12/12/2024
title: Create XML-based help using PlatyPS
---
# Create XML-based help using PlatyPS
Expand Down Expand Up @@ -306,6 +306,6 @@ the [PowerShell style guide][11] and [Editing reference articles][10].
[14]: #creating-an-updateable-help-package
[15]: https://commonmark.org
[16]: https://github.com/PowerShell/platyps
[17]: https://github.com/PowerShell/platyPS/blob/master/platyPS.schema.md
[17]: https://github.com/PowerShell/platyPS/blob/master/docs/developer/platyPS/platyPS.schema.md
[18]: https://pandoc.org
[19]: https://www.powershellgallery.com/packages/platyPS/
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml
Module Name: PSScriptAnalyzer
ms.date: 10/07/2021
ms.date: 12/12/2024
online version: https://learn.microsoft.com/powershell/module/psscriptanalyzer/get-scriptanalyzerrule?view=ps-modules&wt.mc_id=ps-gethelp
schema: 2.0.0
---
Expand Down Expand Up @@ -92,7 +92,7 @@ one value, but wildcards are supported. To get rules in subdirectories of the pa
**RecurseCustomRulePath** parameter.

You can create custom rules using a .NET assembly or a PowerShell module, such as the
[Community Analyzer Rules](https://github.com/PowerShell/PSScriptAnalyzer/blob/development/Tests/Engine/CommunityAnalyzerRules/CommunityAnalyzerRules.psm1)
[Community Analyzer Rules](https://github.com/PowerShell/PSScriptAnalyzer/tree/main/Tests/Engine/CommunityAnalyzerRules)
in the GitHub repository.

```yaml
Expand Down
24 changes: 12 additions & 12 deletions reference/ps-modules/PlatyPS/New-ExternalHelp.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: platyPS-help.xml
Module Name: platyPS
ms.date: 03/16/2021
ms.date: 12/12/2024
online version: https://learn.microsoft.com/powershell/module/platyps/new-externalhelp?view=ps-modules&wt.mc_id=ps-gethelp
schema: 2.0.0
---
Expand All @@ -24,8 +24,8 @@ The `New-ExternalHelp` cmdlet creates an external help file based on markdown he
by PlatyPS. You can ship this with a module to provide help using the `Get-Help` cmdlet.

If the markdown files that you specify don't follow the PlatyPS
[Schema](https://github.com/PowerShell/platyPS/blob/master/platyPS.schema.md), this cmdlet returns
error messages.
[Schema](https://github.com/PowerShell/platyPS/blob/master/docs/developer/platyPS/platyPS.schema.md),
this cmdlet returns error messages.

## EXAMPLES

Expand All @@ -42,8 +42,8 @@ Mode LastWriteTime Length Name
-a---- 5/19/2016 12:32 PM 46776 platyPS-help.xml
```

This command creates an external help file in the specified location.
This command uses the best practice that the folder name includes the locale.
This command creates an external help file in the specified location. This command uses the best
practice that the foldername includes the locale.

### Example 2: Create help that uses custom encoding

Expand Down Expand Up @@ -77,15 +77,15 @@ Mode LastWriteTime Length Name
```

This command creates an external help file in the specified location. This command uses the best
practice that the folder name includes the locale. This command writes the warnings and errors to
the WarningsAndErrors.json file.
practice that the foldername includes the locale. This command writes the warnings and errors to the
`WarningsAndErrors.json` file.

## PARAMETERS

### -OutputPath

Specifies the path of a folder where this cmdlet saves your external help file.
The folder name should end with a locale folder, as in the following example: `.\out\PlatyPS\en-US\`.
Specifies the path of a folder where this cmdlet saves your external help file. The folder name
should end with a locale folder, as in the following example: `.\out\PlatyPS\en-US\`.

```yaml
Type: String
Expand Down Expand Up @@ -192,9 +192,9 @@ Accept wildcard characters: False

### -ErrorLogFile

The path where this cmdlet will save formatted results log file.
The path where this cmdlet saves formatted results log file.

The path must include the location and name of the folder and file name with the json extension. The
The path must include the location and name of the folder and filename with the json extension. The
JSON object contains three properties: **Message**, **FilePath**, and **Severity** (Warning or
Error).

Expand Down Expand Up @@ -255,4 +255,4 @@ This cmdlet returns a `FileInfo[]` object for created files.

[PowerShell V2 External MAML Help](https://devblogs.microsoft.com/powershell/powershell-v2-external-maml-help/)

[Schema](https://github.com/PowerShell/platyPS/blob/master/platyPS.schema.md)
[Schema](https://github.com/PowerShell/platyPS/blob/master/docs/developer/platyPS/platyPS.schema.md)

0 comments on commit 4f29fa3

Please sign in to comment.