Skip to content

Commit 285fed9

Browse files
committed
added info about environment variables
1 parent b2ee16d commit 285fed9

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Environment variables
2+
3+
PnP PowerShell supports a few environment variables you can set to control some of its behaviour. Besides environment variables you can set, PnP PowerShell will also set a few environments for you to use.
4+
5+
## Environment variables you can set
6+
7+
| Environment variable | Description|
8+
| ---------------------------|--------------------------|
9+
| MicrosoftGraphEndPoint | Overrides the default Microsoft Graph endpoint (https://graph.microsoft.com) to use |
10+
| ENTRAID_APP_ID | When set [`Connect-PnPOnline`](../cmdlets/connect-pnponline.md) will use this value for authentication. See more info at [Set a default Client ID](defaultclientid.md) |
11+
| ENTRAID_CLIENT_ID | See ENTRAID_APP_ID |
12+
| AZURE_USERNAME | A way to set the username to use when authenticating with `Connect-PnPOnline -EnvironmentVariable` |
13+
| AZURE_PASSWORD | A way to set the password to use when authenticating with `Connect-PnPOnline -EnvironmentVariable` |
14+
| AZURE_CLIENT_ID | A way to set the application registration id/client id to use when authenticating with `Connect-PnPOnline -EnvironmentVariable` |
15+
| AZURE_CLIENT_CERTIFICATE_PATH | Allows you to set the path to the certificate to use to authenticate with `Connect-PnPOnline -EnvironmentVariable` |
16+
| AZURE_CLIENT_CERTIFICATE_PASSWORD | Allows you to set the password to access the certificate to use to authenticate with `Connect-PnPOnline -EnvironmentVariable` |
17+
| PNPPOWERSHELL_DISABLETELEMETRY| Set to 'false' (lowercase) to disable telemetry |
18+
| PNPPSCOMPLETERTIMEOUT | Defines the timeout to use when using << tab >> completion with PnP PowerShell (available in version 2.99.45 and higher). Tab completion defaults to 2 seconds timeout. The environment variable expects a value in milliseconds. E.g. 1000 equals 1 second. Set the value to 0 to disable tab completion.
19+
20+
## Environment variables set for you
21+
22+
| Environment variable | Description|
23+
| ---------------------------|--------------------------|
24+
| PNPPSHOST | The fully qualified hostname of the tenant you are connected to, e.g. `yourtenant.sharepoint.com` |
25+
| PNPPSSITE | The server relative path to the site you are connected to, e.g. `/sites/yoursite` |

pages/articles/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
href: updatenotifications.md
1717
- name: Default Client Id
1818
href: defaultclientid.md
19+
- name: Environment variables
20+
href: environmentvariables.md
1921
- name: Using PnP PowerShell in Azure
2022
items:
2123
- name: Introduction

0 commit comments

Comments
 (0)