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
12 changes: 9 additions & 3 deletions pages/articles/authentication.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
uid: pnp.powershell.authentication
title: Authentication
description: Authentication options for connecting to Microsoft 365 with PnP PowerShell.
---

# Authentication

Before you can authenticate using PnP PowerShell, you need to ensure you have [created your own application registration](registerapplication.md) first and that you have [set the proper permissions](determinepermissions.md) on the application registration.
Before you can authenticate using PnP PowerShell, you need to ensure you have [created your own application registration](xref:pnp.powershell.registerapplication) first and that you have [set the proper permissions](determinepermissions.md) on the application registration.

PnP PowerShell offers many different ways to authenticate to your tenant. Based on what you would like to achieve, pick the method that best suits your needs below.

Expand All @@ -16,7 +22,7 @@ Connecting can be done using:
Connect-PnPOnline [yourtenant].sharepoint.com -Interactive -ClientId <client id of your Entra ID Application Registration>
```

This will show a popup window which will allow to authenticate and step through the multi-factor authentication flow. Ensure you provide [the Client ID of your own Entra ID Application Registration](registerapplication.md) with the `-ClientId` parameter.
This will show a popup window which will allow to authenticate and step through the multi-factor authentication flow. Ensure you provide [the Client ID of your own Entra ID Application Registration](xref:pnp.powershell.registerapplication) with the `-ClientId` parameter.

## Authenticating from another device or specific browser

Expand Down Expand Up @@ -101,7 +107,7 @@ Connecting can be done using:
Connect-PnPOnline [yourtenant].sharepoint.com -ClientId <client id of your Entra ID Application Registration> -Credentials (Get-Credential)
```

and you will be prompted for credentials. Ensure you provide [the Client ID of your own Entra ID Application Registration](registerapplication.md) with the `-ClientId` parameter.
and you will be prompted for credentials. Ensure you provide [the Client ID of your own Entra ID Application Registration](xref:pnp.powershell.registerapplication) with the `-ClientId` parameter.

## Authenticating with pre-stored credentials using the Windows Credential Manager (Windows only)

Expand Down
8 changes: 7 additions & 1 deletion pages/articles/gettingstartedcontributing.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
uid: pnp.powershell.gettingstartedcontributing
title: Contribution guidance
description: Prepare a local development environment and start contributing to PnP PowerShell.
---

# Contribution guidance

Sharing is caring! All contributions to this repository are very welcome. This guidance should help you getting started contributing to PnP PowerShell by just following some easy steps.
Expand Down Expand Up @@ -111,7 +117,7 @@ The next step is to download, or clone, your copy/fork of the repository to your

It may be that it asks you to log on to GitHub. If so, do so and it will continue with the clone.

1. You should now have a copy of the PnP PowerShell code on your local machine in the subfolder named similarly to your fork name, typically `powershell`. If you want to read up on an explanation what each of these folders are for, read the [folder structure](./buildingfolderstructure.md) article.
1. You should now have a copy of the PnP PowerShell code on your local machine in the subfolder named similarly to your fork name, typically `powershell`. If you want to read up on an explanation what each of these folders are for, read the [folder structure](xref:buildingsourcecode) article.

![Local code](./../images/contributing/localcode.png)

Expand Down
6 changes: 6 additions & 0 deletions pages/articles/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
uid: pnp.powershell.articles
title: PnP PowerShell articles
description: Articles that explain how to install, configure, authenticate, use, and contribute to PnP PowerShell.
---

# Articles

Here you will find various articles, ranging from installing, upgrading, advanced topics and how to build the source code. Navigate the articles in the menu at the left.
6 changes: 6 additions & 0 deletions pages/articles/installation.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
uid: pnp.powershell.installation
title: Installing PnP PowerShell
description: Install, update, and uninstall the PnP PowerShell module.
---

# Installing PnP PowerShell

You need PowerShell 7.4.0 or later to use PnP PowerShell. It is available for Windows, Linux and Mac and can be [installed through here](https://learn.microsoft.com/powershell/scripting/install/installing-powershell).
Expand Down
8 changes: 7 additions & 1 deletion pages/articles/registerapplication.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
uid: pnp.powershell.registerapplication
title: Register an Entra ID Application to use with PnP PowerShell
description: Register the Entra ID application required to authenticate with PnP PowerShell.
---

# Register an Entra ID Application to use with PnP PowerShell

> [!NOTE]
Expand Down Expand Up @@ -106,7 +112,7 @@ Another option is to manually create the application registration in Entra ID. W

![image](../images/registerapplication/entraid_new_app_apipermissions_addpermission_grant_admin_consent_remove_other.png)

1. The _Configured permissions_ section should now look similar to the screenshot below. You can now use this application to [connect to PnP PowerShell](authentication.md) or [add additional permissions](determinepermissions.md) to this application registration as necessary.
1. The _Configured permissions_ section should now look similar to the screenshot below. You can now use this application to [connect to PnP PowerShell](xref:pnp.powershell.authentication) or [add additional permissions](determinepermissions.md) to this application registration as necessary.

![image](../images/registerapplication/entraid_new_app_apipermissions_minimal.png)

Expand Down
6 changes: 6 additions & 0 deletions pages/cmdlets/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
uid: pnp.powershell.cmdlets
title: PnP PowerShell cmdlets
description: Full cmdlet reference for PnP PowerShell.
---

# PnP PowerShell cmdlets

PnP PowerShell exists out of %%cmdletcount%% cmdlets which can help you in setting up, configuring, maintaining and using various Microsoft 365 products from one single connection. Each of the cmdlets is documented to aid in learning how to use it. Find the available cmdlets below.
Expand Down
33 changes: 31 additions & 2 deletions pages/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"resource": [
{
"files": [
"images/**"
"images/**",
"llms.txt"
]
}
],
Expand Down Expand Up @@ -50,7 +51,8 @@
"_description": "PnP PowerShell is an open source, community driven, PowerShell Module designed to work with Microsoft 365.",
"_appLogoPath": "images/logo.svg",
"_enableSearch": true,
"_enableNewTab": true
"_enableNewTab": true,
"_lang": "en"
},
"fileMetadata": {
"_gitContribute": {
Expand All @@ -60,6 +62,33 @@
"path":"documentation"
}
}
},
"sitemap": {
"baseUrl": "https://pnp.github.io/powershell/",
"changefreq": "weekly",
"priority": 0.5,
"fileOptions": {
"articles/**.md": {
"changefreq": "monthly",
"priority": 0.7
},
"cmdlets/**.md": {
"changefreq": "weekly",
"priority": 0.6
},
"articles/index.md": {
"changefreq": "weekly",
"priority": 0.8
},
"cmdlets/index.md": {
"changefreq": "weekly",
"priority": 0.9
},
"index.md": {
"changefreq": "weekly",
"priority": 1.0
}
}
}
}
}
18 changes: 12 additions & 6 deletions pages/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
uid: pnp.powershell.home
title: PnP PowerShell
description: PnP PowerShell is a cross-platform PowerShell module for working with Microsoft 365 services.
---

# PnP PowerShell
PnP PowerShell is a cross-platform PowerShell Module providing over 700 cmdlets that work with Microsoft 365 environments and products such as SharePoint Online, Microsoft Teams, Microsoft Planner, Microsoft Power Platform, Microsoft Entra, Microsoft Purview, Microsoft Search, and more. It runs on Windows, Linux and MacOS.

Expand All @@ -10,15 +16,15 @@ PnP PowerShell is a cross-platform PowerShell Module providing over 700 cmdlets

Starting to use PnP PowerShell consists out of 3 steps:

1. [Installing the PnP.PowerShell module](./articles/installation.md)
1. [Installing the PnP.PowerShell module](xref:pnp.powershell.installation)

2. [Registering your own Entra ID Application](./articles/registerapplication.md)
2. [Registering your own Entra ID Application](xref:pnp.powershell.registerapplication)

3. [Connecting and authenticating](./articles/authentication.md)
3. [Connecting and authenticating](xref:pnp.powershell.authentication)

Once you're set up, check out the [cmdlets](/powershell/cmdlets) section to discover what you can do and how to use the cmdlets.
Once you're set up, check out the [cmdlets](xref:pnp.powershell.cmdlets) section to discover what you can do and how to use the cmdlets.

Have a look at the [articles](/powershell/articles) section covering various topics how to get the most out of using PnP PowerShell.
Have a look at the [articles](xref:pnp.powershell.articles) section covering various topics how to get the most out of using PnP PowerShell.

## I've found a bug, where do I need to log an issue or create a PR

Expand All @@ -30,7 +36,7 @@ Before you start to work on code change consider starting a discussion in the re

## Contributing to PnP PowerShell

Follow the [getting started contributing](/powershell/articles/gettingstartedcontributing.html) guidelines to help out. Sharing is caring!
Follow the [getting started contributing](xref:pnp.powershell.gettingstartedcontributing) guidelines to help out. Sharing is caring!

## Supportability and SLA

Expand Down
45 changes: 45 additions & 0 deletions pages/llms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# PnP PowerShell

> Cross-platform PowerShell module for working with Microsoft 365 services, including SharePoint Online, Microsoft Teams, Microsoft Planner, Microsoft Power Platform, Microsoft Entra, Microsoft Purview, and Microsoft Search.

This documentation site is the canonical public reference for installing, authenticating, and using PnP PowerShell cmdlets.

## Start here

- [Overview](https://pnp.github.io/powershell/): What PnP PowerShell is and how to start.
- [Install PnP PowerShell](https://pnp.github.io/powershell/articles/installation.html): Install, update, and uninstall the module.
- [Register an Entra ID application](https://pnp.github.io/powershell/articles/registerapplication.html): Create the required app registration for authentication.
- [Authentication](https://pnp.github.io/powershell/articles/authentication.html): Choose an interactive, device login, certificate, managed identity, or other connection method.
- [Determine permissions](https://pnp.github.io/powershell/articles/determinepermissions.html): Understand required delegated and application permissions.

## Cmdlet reference

- [Cmdlet index](https://pnp.github.io/powershell/cmdlets/index.html): Full cmdlet list.
- [Connect-PnPOnline](https://pnp.github.io/powershell/cmdlets/Connect-PnPOnline.html): Create a connection used by other PnP PowerShell cmdlets.
- [Disconnect-PnPOnline](https://pnp.github.io/powershell/cmdlets/Disconnect-PnPOnline.html): Disconnect active sessions.
- [Get-PnPConnection](https://pnp.github.io/powershell/cmdlets/Get-PnPConnection.html): Inspect the current connection.
- [Register-PnPEntraIDApp](https://pnp.github.io/powershell/cmdlets/Register-PnPEntraIDApp.html): Register an Entra ID application for app-only access.
- [Register-PnPEntraIDAppForInteractiveLogin](https://pnp.github.io/powershell/cmdlets/Register-PnPEntraIDAppForInteractiveLogin.html): Register an Entra ID application for interactive login.

## Common scenarios

- [Default Client ID](https://pnp.github.io/powershell/articles/defaultclientid.html): Configure a default app client ID for scripts.
- [Environment variables](https://pnp.github.io/powershell/articles/environmentvariables.html): Configure module behavior with environment variables.
- [Azure Functions](https://pnp.github.io/powershell/articles/azurefunctions.html): Use PnP PowerShell in Azure Functions.
- [Azure Automation Runbooks](https://pnp.github.io/powershell/articles/azureautomationrunbook.html): Use PnP PowerShell in runbooks.
- [Batching](https://pnp.github.io/powershell/articles/batching.html): Batch supported operations.
- [Persisted logins](https://pnp.github.io/powershell/articles/persistedlogin.html): Work with persisted authentication.

## Project and contribution docs

- [Getting started contributing](https://pnp.github.io/powershell/articles/gettingstartedcontributing.html): Prepare a local development environment.
- [Building the documentation site locally](https://pnp.github.io/powershell/articles/buildingdocumentation.html): Build and preview this documentation site.
- [GitHub repository](https://github.com/pnp/powershell): Source code, issues, discussions, and pull requests.
- [Changelog](https://github.com/pnp/powershell/blob/dev/CHANGELOG.md): Recent changes.

## Notes for AI agents

- Prefer pages under `https://pnp.github.io/powershell/` for current public documentation.
- Use cmdlet reference pages for syntax, parameters, examples, outputs, and required permissions.
- Most scripts need `Connect-PnPOnline` first. Authentication now requires using your own Entra ID application registration for common interactive flows.
- Respect security guidance in the authentication and permissions articles. Do not suggest hardcoded credentials, broad permissions, or legacy authentication patterns when safer documented alternatives exist.
95 changes: 95 additions & 0 deletions pages/templates/pnp-modern/public/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,101 @@ article h4 {
--bs-alert-link-color: var(--bs-primary-text-emphasis);
}

pre {
position: relative;
}

pre > code {
display: block;
padding-inline-end: 5.75rem !important;
padding-right: 5.75rem !important;
}

pre > .code-action {
align-items: center;
background: var(--bs-body-bg);
border: 1px solid rgba(var(--pnp-header-bg-rgb), .38) !important;
border-radius: .375rem;
box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
color: var(--bs-link-color);
display: inline-flex;
font-weight: 600;
gap: .35rem;
min-height: 2rem;
opacity: .94;
padding: .25rem .55rem;
position: absolute;
right: .75rem;
top: .75rem;
z-index: 2;
}

pre:hover > .code-action,
pre:focus-within > .code-action {
display: inline-flex;
}
Comment on lines +189 to +192

pre > .code-action::after {
content: "Copy";
font-size: .8125rem;
line-height: 1;
}

pre > .code-action:hover,
pre > .code-action:focus,
pre > .code-action:focus-visible {
background: var(--pnp-header-bg);
border-color: var(--pnp-highlight) !important;
color: var(--pnp-header-fg);
opacity: 1;
text-decoration: none;
}

pre > .code-action.link-success {
background: #198754;
border-color: #198754 !important;
color: #fff;
opacity: 1;
}

pre > .code-action.link-success::after {
content: "Copied";
}

pre > .code-action .bi {
font-size: 1rem;
line-height: 1;
}

[data-bs-theme="dark"] pre > .code-action {
background: #202A33;
border-color: rgba(var(--pnp-highlight-rgb), .45) !important;
color: #B9E0FF;
}

[data-bs-theme="dark"] pre > .code-action:hover,
[data-bs-theme="dark"] pre > .code-action:focus,
[data-bs-theme="dark"] pre > .code-action:focus-visible {
background: var(--pnp-highlight);
color: #06131C;
}

@media (max-width: 575.98px) {
pre > code {
padding-right: 3.25rem;
}

pre > .code-action {
min-width: 2rem;
padding: .25rem .45rem;
}

pre > .code-action::after {
content: "";
margin: 0;
}
}

body > footer {
background: var(--pnp-footer-bg);
border-top-color: transparent !important;
Expand Down
Loading