Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Changed `Get-PnPContainer`, `Remove-PnPContainer` and `Restore-PnPDeletedContainer` to accept the api url of a container, such as the `ContainerApiUrl` returned by `Get-PnPContainer`, and `Remove-PnPContainer` to accept the containers returned by `Get-PnPContainer` from the pipeline. [#5487](https://github.com/pnp/powershell/pull/5487)
- Changed `Get-PnPContainerTypeConfiguration` to also return the application redirect url, the sharing allow lists and their tenant overrides, the Copilot embedded chat hosts, the anonymous link expiration, and whether archiving and the legacy item web url are enabled. [#5487](https://github.com/pnp/powershell/pull/5487)
- Changed `New-PnPContainerType` to create a standard container type when `-TrialContainerType` is not used, instead of writing a warning and creating nothing. `-AzureSubscriptionId`, `-ResourceGroup` and `-Region` are marked obsolete and are ignored; set up the billing of a standard container type separately, for example with `Add-SPOContainerTypeBilling`. [#5487](https://github.com/pnp/powershell/pull/5487)
- Marked `Get-PnPSyntexModel`, `Get-PnPSyntexModelPublication`, `Publish-PnPSyntexModel`, `Unpublish-PnPSyntexModel` and `Request-PnPSyntexClassifyAndExtract` as obsolete, as SharePoint Syntex is no longer supported and its support has been removed from the PnP Core SDK. The cmdlets are kept for backwards compatibility with existing scripts, but no longer do anything other than write a warning, no longer require a connection, and will be removed in a future version. `-PublicationViewOption` on `Publish-PnPSyntexModel` now takes a string and `-Connection` is ignored. [#5496](https://github.com/pnp/powershell/pull/5496)

### Fixed
- Using UPNs with an apostrophe in it not working with `Remove-PnPUserProfile`, `Export-PnPUserProfile`, `Export-PnPUserInfo`, and `Remove-PnPUserInfo`. The apostrophe is now escaped in the API request. [#5459](https://github.com/pnp/powershell/pull/5459)
Expand Down
5 changes: 4 additions & 1 deletion documentation/Get-PnPSyntexModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ online version: https://pnp.github.io/powershell/cmdlets/Get-PnPSyntexModel.html

# Get-PnPSyntexModel

> [!WARNING]
> This cmdlet is obsolete and no longer does anything, as SharePoint Syntex is no longer supported. It only writes a warning and will be removed in a future version.

## SYNOPSIS
Returns Microsoft Syntex models from a Syntex Content Center.

Expand Down Expand Up @@ -51,7 +54,7 @@ Gets the document processing model named "Invoice model".
## PARAMETERS

### -Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Ignored, as this cmdlet no longer performs any request. Kept for backwards compatibility with existing scripts.

```yaml
Type: PnPConnection
Expand Down
5 changes: 4 additions & 1 deletion documentation/Get-PnPSyntexModelPublication.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ online version: https://pnp.github.io/powershell/cmdlets/Get-PnPSyntexModelPubli

# Get-PnPSyntexModelPublication

> [!WARNING]
> This cmdlet is obsolete and no longer does anything, as SharePoint Syntex is no longer supported. It only writes a warning and will be removed in a future version.

## SYNOPSIS
Returns the libraries to which a Microsoft Syntex model was published.

Expand Down Expand Up @@ -36,7 +39,7 @@ Gets the libraries to which the document processing model named "Invoice model"
## PARAMETERS

### -Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Ignored, as this cmdlet no longer performs any request. Kept for backwards compatibility with existing scripts.

```yaml
Type: PnPConnection
Expand Down
14 changes: 8 additions & 6 deletions documentation/Publish-PnPSyntexModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ online version: https://pnp.github.io/powershell/cmdlets/Publish-PnPSyntexModel.

# Publish-PnPSyntexModel

> [!WARNING]
> This cmdlet is obsolete and no longer does anything, as SharePoint Syntex is no longer supported. It only writes a warning and will be removed in a future version.

## SYNOPSIS

Publishes Microsoft Syntex models to a list.
Expand All @@ -24,14 +27,14 @@ This cmdlet only works when you've connected to a Syntex Content Center site.
### Single

```powershell
Publish-PnPSyntexModel -Model <SyntexModelPipeBind> -ListWebUrl <string> -List <ListPipeBind> [-PublicationViewOption <MachineLearningPublicationViewOption>] [-Connection <PnPConnection>]
Publish-PnPSyntexModel -Model <SyntexModelPipeBind> -ListWebUrl <string> -List <ListPipeBind> [-PublicationViewOption <string>] [-Connection <PnPConnection>]

```

### Batched

```powershell
Publish-PnPSyntexModel -Model <SyntexModelPipeBind> -TargetSiteUrl <string> -TargetWebServerRelativeUrl <string> -TargetLibraryServerRelativeUrl <string> -Batch <PnPBatch> [-PublicationViewOption <MachineLearningPublicationViewOption>] [-Connection <PnPConnection>]
Publish-PnPSyntexModel -Model <SyntexModelPipeBind> -TargetSiteUrl <string> -TargetWebServerRelativeUrl <string> -TargetLibraryServerRelativeUrl <string> -Batch <PnPBatch> [-PublicationViewOption <string>] [-Connection <PnPConnection>]

```

Expand Down Expand Up @@ -61,7 +64,7 @@ Adds the publishing of the document processing model named "Invoice model" to th

### -Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Ignored, as this cmdlet no longer performs any request. Kept for backwards compatibility with existing scripts.

```yaml
Type: PnPConnection
Expand Down Expand Up @@ -189,13 +192,12 @@ Accept wildcard characters: False
The view options to apply when publishing the model to the list.

```yaml
Type: MachineLearningPublicationViewOption
Type: String
Parameter Sets: (All)
Accepted values: NewView, NewViewAsDefault, NoNewView

Required: False
Position: Named
Default value: NewViewAsDefault
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
5 changes: 4 additions & 1 deletion documentation/Request-PnPSyntexClassifyAndExtract.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ online version: https://pnp.github.io/powershell/cmdlets/Request-PnPSyntexClassi

# Request-PnPSyntexClassifyAndExtract

> [!WARNING]
> This cmdlet is obsolete and no longer does anything, as SharePoint Syntex is no longer supported. It only writes a warning and will be removed in a future version.

## SYNOPSIS

Requests for a file, folder or all files in a library to be classified and extracted via the published Microsoft Syntex models on the libraries hosting the files.
Expand Down Expand Up @@ -76,7 +79,7 @@ Requests the classification and extraction of all files in the folder "jan" in l

### -Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Ignored, as this cmdlet no longer performs any request. Kept for backwards compatibility with existing scripts.

```yaml
Type: PnPConnection
Expand Down
5 changes: 4 additions & 1 deletion documentation/Unpublish-PnPSyntexModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ online version: https://pnp.github.io/powershell/cmdlets/Unpublish-PnPSyntexMode

# Unpublish-PnPSyntexModel

> [!WARNING]
> This cmdlet is obsolete and no longer does anything, as SharePoint Syntex is no longer supported. It only writes a warning and will be removed in a future version.

## SYNOPSIS

Unpublishes a Microsoft Syntex model from a list.
Expand Down Expand Up @@ -61,7 +64,7 @@ Adds the unpublishing of the document processing model named "Invoice model" fro

### -Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Ignored, as this cmdlet no longer performs any request. Kept for backwards compatibility with existing scripts.

```yaml
Type: PnPConnection
Expand Down
3 changes: 0 additions & 3 deletions pages/articles/batching.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,3 @@ The following cmdlets support batching. (This support began with the 1.7.63-nigh
* [`Add-PnPListItem`](/powershell/cmdlets/Add-PnPListItem.html)
* [`Set-PnPListItem`](/powershell/cmdlets/Set-PnPListItem.html)
* [`Remove-PnPListItem`](/powershell/cmdlets/Remove-PnPListItem.html)
* [`Publish-PnPSyntexModel`](/powershell/cmdlets/Publish-PnPSyntexModel.html)
* [`Unpublish-PnPSyntexModel`](/powershell/cmdlets/Unpublish-PnPSyntexModel.html)
* [`Request-PnPSyntexClassifyAndExtract`](/powershell/cmdlets/Request-PnPSyntexClassifyAndExtract.html)
83 changes: 1 addition & 82 deletions src/Commands/Base/PipeBinds/SyntexModelPipeBind.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
using PnP.Core.Model.SharePoint;
using PnP.PowerShell.Commands.Model;
using System;
using System.Linq;

namespace PnP.PowerShell.Commands.Base.PipeBinds
namespace PnP.PowerShell.Commands.Base.PipeBinds
{
public sealed class SyntexModelPipeBind
{
private readonly int syntexModelId;
private readonly string syntexModelName;
private readonly ISyntexModel syntexModel;

public SyntexModelPipeBind(ISyntexModel syntexModel)
{
this.syntexModel = syntexModel;
}

public SyntexModelPipeBind(string name)
{
Expand All @@ -26,80 +15,10 @@ public SyntexModelPipeBind(int id)
this.syntexModelId = id;
}

public ISyntexModel SyntexModel => syntexModel;

public string Name => syntexModelName;

public int Id => syntexModelId;

public override string ToString() => Name;

internal ISyntexModel GetSyntexModel(PnPConnection connection)
{
if (syntexModel != null)
{
return syntexModel;
}
else if (syntexModelId > 0)
{
var ctx = connection.PnPContext;
var syntexContentCenter = ctx.Web.AsSyntexContentCenter();
var models = syntexContentCenter.GetSyntexModels();
return models.FirstOrDefault(p => p.Id == syntexModelId);
}
else if (!string.IsNullOrEmpty(syntexModelName))
{
var ctx = connection.PnPContext;
var syntexContentCenter = ctx.Web.AsSyntexContentCenter();
var models = syntexContentCenter.GetSyntexModels();
return models.FirstOrDefault(p => p.Name.Equals(syntexModelName, StringComparison.InvariantCultureIgnoreCase));
}
else
{
return null;
}
}

internal ISyntexModel GetSyntexModel(PnPBatch batch, PnPConnection connection)
{
if (syntexModel != null)
{
return syntexModel;
}
else if (syntexModelId > 0)
{
var batchedSyntexModel = batch.GetCachedSyntexModel(syntexModelId);
if (batchedSyntexModel != null)
{
return batchedSyntexModel;
}

var ctx = connection.PnPContext;
var syntexContentCenter = ctx.Web.AsSyntexContentCenter();
var models = syntexContentCenter.GetSyntexModels();
var syntexModel = models.FirstOrDefault(p => p.Id == syntexModelId);
batch.CacheSyntexModel(syntexModel);
return syntexModel;
}
else if (!string.IsNullOrEmpty(syntexModelName))
{
var batchedSyntexModel = batch.GetCachedSyntexModel(syntexModelName);
if (batchedSyntexModel != null)
{
return batchedSyntexModel;
}

var ctx = connection.PnPContext;
var syntexContentCenter = ctx.Web.AsSyntexContentCenter();
var models = syntexContentCenter.GetSyntexModels();
var syntexModel = models.FirstOrDefault(p => p.Name.Equals(syntexModelName, StringComparison.InvariantCultureIgnoreCase));
batch.CacheSyntexModel(syntexModel);
return syntexModel;
}
else
{
return null;
}
}
}
}
24 changes: 0 additions & 24 deletions src/Commands/Model/PnPBatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public class PnPBatch
internal List<IContentType> ContentTypes { get; set; } = new List<IContentType>();
internal List<(string key, Guid id, string label)> Terms { get; set; } = new List<(string key, Guid id, string label)>();

internal List<ISyntexModel> SyntexModels { get; set; } = new List<ISyntexModel>();

internal int? DefaultTermStoreLanguage { get; set; }
internal TaxonomySession TaxonomySession { get; set; }
internal Microsoft.SharePoint.Client.Taxonomy.TermStore TermStore { get; set; }
Expand Down Expand Up @@ -56,7 +54,6 @@ internal void ClearCache()
{
Lists.Clear();
ContentTypes.Clear();
SyntexModels.Clear();
}

internal IList GetCachedList(Guid id)
Expand Down Expand Up @@ -84,16 +81,6 @@ internal IContentType GetCachedContentType(string idOrName)
return ct;
}

internal ISyntexModel GetCachedSyntexModel(int id)
{
return SyntexModels.FirstOrDefault(c => c.Id == id);
}

internal ISyntexModel GetCachedSyntexModel(string modelName)
{
return SyntexModels.FirstOrDefault(c => c.Name == modelName);
}

internal void CacheList(IList list)
{
var existingList = Lists.FirstOrDefault(l => l.Id == list.Id);
Expand All @@ -115,17 +102,6 @@ internal void CacheContentType(IContentType contentType)
ContentTypes.Add(contentType);
}

internal void CacheSyntexModel(ISyntexModel model)
{
var existingModel = SyntexModels.FirstOrDefault(c => c.UniqueId == model.UniqueId);
if (existingModel != null)
{
SyntexModels.Remove(existingModel);
}

SyntexModels.Add(model);
}

internal void CacheTerm(string key, Guid id, string label)
{
this.Terms.Add((key, id, label));
Expand Down
60 changes: 0 additions & 60 deletions src/Commands/Model/Syntex/SyntexClassifyAndExtractResult.cs

This file was deleted.

35 changes: 0 additions & 35 deletions src/Commands/Model/Syntex/SyntexModel.cs

This file was deleted.

Loading
Loading