Skip to content

Commit 22acea9

Browse files
committed
update scripts to ps7
1 parent 62c7ce9 commit 22acea9

File tree

6 files changed

+10
-24
lines changed

6 files changed

+10
-24
lines changed

2-WebApp-graph-user/2-6-BFF-Proxy/AppCreationScripts/AppCreationScripts.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44

55
### Quick summary
66

7-
1. On Windows, run PowerShell as **Administrator** and navigate to the root of the cloned directory
8-
1. In PowerShell run:
9-
10-
```PowerShell
11-
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
12-
```
13-
147
1. Run the script to create your Azure AD application and configure the code of the sample application accordingly.
158

169
```PowerShell
@@ -59,28 +52,23 @@ The `Configure.ps1` will stop if it tries to create an Azure AD application whic
5952

6053
### Pre-requisites
6154

55+
1. PowerShell 7 or later (see: [installing PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell))
6256
1. Open PowerShell (On Windows, press `Windows-R` and type `PowerShell` in the search window)
63-
1. Navigate to the root directory of the project.
64-
1. Until you change it, the default [Execution Policy](https:/go.microsoft.com/fwlink/?LinkID=135170) for scripts is usually `Restricted`. In order to run the PowerShell script you need to set the Execution Policy to `RemoteSigned`. You can set this just for the current PowerShell process by running the command:
65-
66-
```PowerShell
67-
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
68-
```
6957

7058
### (Optionally) install Microsoft.Graph.Applications PowerShell modules
7159

7260
The scripts install the required PowerShell module (Microsoft.Graph.Applications) for the current user if needed. However, if you want to install if for all users on the machine, you can follow the following steps:
7361

7462
1. If you have never done it already, in the PowerShell window, install the Microsoft.Graph.Applications PowerShell modules. For this:
7563

76-
1. Open PowerShell as admin (On Windows, Search Powershell in the search bar, right click on it and select **Run as administrator**).
64+
1. Open PowerShell
7765
2. Type:
7866

7967
```PowerShell
8068
Install-Module Microsoft.Graph.Applications
8169
```
8270
83-
or if you cannot be administrator on your machine, run:
71+
or if you want the modules to be installed for the current user only, run:
8472
8573
```PowerShell
8674
Install-Module Microsoft.Graph.Applications -Scope CurrentUser

2-WebApp-graph-user/2-6-BFF-Proxy/AppCreationScripts/Cleanup-WithCertificates.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
1+
#Requires -Version 7
2+
23
[CmdletBinding()]
34
param(
45
[Parameter(Mandatory=$False, HelpMessage='Tenant ID (This is a GUID which represents the "Directory ID" of the AzureAD tenant into which you want to create the apps')]

2-WebApp-graph-user/2-6-BFF-Proxy/AppCreationScripts/Cleanup.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
1+
#Requires -Version 7
2+
23
[CmdletBinding()]
34
param(
45
[Parameter(Mandatory=$False, HelpMessage='Tenant ID (This is a GUID which represents the "Directory ID" of the AzureAD tenant into which you want to create the apps')]

2-WebApp-graph-user/2-6-BFF-Proxy/AppCreationScripts/Configure-WithCertificates.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Requires -Version 7
12

23
[CmdletBinding()]
34
param(

2-WebApp-graph-user/2-6-BFF-Proxy/AppCreationScripts/Configure.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Requires -Version 7
12

23
[CmdletBinding()]
34
param(

2-WebApp-graph-user/2-6-BFF-Proxy/README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,7 @@ There is one project in this sample. To register it, you can:
9797

9898
> :warning: If you have never used **Microsoft Graph PowerShell** before, we recommend you go through the [App Creation Scripts Guide](./AppCreationScripts/AppCreationScripts.md) once to ensure that your environment is prepared correctly for this step.
9999

100-
1. On Windows, run PowerShell as **Administrator** and navigate to the root of the cloned directory
101-
1. In PowerShell run:
102-
103-
```PowerShell
104-
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
105-
```
106-
100+
1. Ensure that you have PowerShell 7 or later.
107101
1. Run the script to create your Azure AD application and configure the code of the sample application accordingly.
108102
1. For interactive process -in PowerShell, run:
109103

0 commit comments

Comments
 (0)