Skip to content

Commit 6c820ee

Browse files
committed
Update Blog “bulk-onboarding-of-users-in-hpe-greenlake-edge-to-cloud-platform”
1 parent 4cac15e commit 6c820ee

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

content/blog/bulk-onboarding-of-users-in-hpe-greenlake-edge-to-cloud-platform.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ I decided to use PowerShell to write this script because it provides easy native
6363

6464
### Step 1 – Reading the parameter from the command line.
6565

66-
```
66+
```powershell
6767
Param($XLFile)
6868
6969
if ($Null -eq $XLFile)
@@ -78,7 +78,7 @@ if ($Null -eq $XLFile)
7878

7979
### Step 2 – Importing data from the 2 sheets of my spreadsheet.
8080

81-
```
81+
```powershell
8282
$tokens =@{}
8383
$invited=@{}
8484
@@ -93,7 +93,7 @@ if ($XLFile)
9393

9494
### Step 3 – Iterating over the Workspaces sheet to collect client secrets, and retrieve access tokens.
9595

96-
```
96+
```powershell
9797
# Ask for client_Secret of each workspace in Excel file
9898
foreach ($workspace in $workspaces_excel ) {
9999
$client_id = $workspace.'Client Id'
@@ -131,7 +131,7 @@ Note that, at the end of this loop, I have a hash table of tokens indexed by Cli
131131

132132
### Step 4 – Iterating over Users sheet to invite each of them.
133133

134-
```
134+
```powershell
135135
# Now walk the list of users to add
136136
$invited.Add($client_id,0)
137137
foreach ($user in $users_excel ) {
@@ -184,7 +184,7 @@ Note that before the loop, I initialized to zero the count of invited users for
184184

185185
### Step 5: Displaying list of users invited in each workspace.
186186

187-
```
187+
```powershell
188188
else
189189
{
190190
write-host 'Mailing list file not provided nor found....'
@@ -240,7 +240,7 @@ foreach ($workspace in $workspaces_excel ) {
240240

241241
Let’s run this script, making sure to reference the right Excel spreadsheet:
242242

243-
```
243+
```powershell
244244
PS /Volumes/Dev/GreenLake/GLP-API-Tooling/Scripts> ./bulk_invite.ps1 -XLfile userlist.xlsx
245245
Enter HPE GreenLake Client Secret for Workspace HPEDEV -GLCP- Hackshack: ********************************
246246
Enter HPE GreenLake Client Secret for Workspace Super Awesome Company: ********************************

0 commit comments

Comments
 (0)