Skip to content

Commit 2dc2963

Browse files
committed
Add documentation for New-Office365Accounts script and update sidebar navigation
1 parent a28a408 commit 2dc2963

3 files changed

Lines changed: 122 additions & 1 deletion

File tree

docs/wiki/Office365/New-Office365Accounts.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,58 @@ Import-Module ActiveDirectory
134134
- Only applicable for Microsoft 365 accounts
135135
- Requires additional Graph permissions
136136

137+
## Running from GitHub
138+
139+
You can invoke this script directly from GitHub without downloading it first. This is particularly useful in Azure Cloud Shell or for quick testing.
140+
141+
### Method 1: Direct Invocation (Recommended for Cloud Shell)
142+
```powershell
143+
# Download and run from GitHub
144+
$scriptUrl = "https://raw.githubusercontent.com/Managed-Solution-LLC/PowerShellEveryting/main/scripts/Office365/New-Office365Accounts.ps1"
145+
Invoke-WebRequest -Uri $scriptUrl -OutFile "./New-Office365Accounts.ps1"
146+
chmod +x ./New-Office365Accounts.ps1 # Linux/Cloud Shell only
147+
148+
# Now run with your parameters
149+
./New-Office365Accounts.ps1 -UserArray $users
150+
```
151+
152+
### Method 2: One-Line Execution (Advanced)
153+
```powershell
154+
# Execute directly without saving
155+
$scriptUrl = "https://raw.githubusercontent.com/Managed-Solution-LLC/PowerShellEveryting/main/scripts/Office365/New-Office365Accounts.ps1"
156+
Invoke-Expression (Invoke-WebRequest -Uri $scriptUrl -UseBasicParsing).Content
157+
```
158+
159+
**Note:** After running with Method 2, you'll need to call the script's functions directly. Method 1 is recommended for most use cases.
160+
161+
### Cloud Shell Quick Start
162+
```powershell
163+
# 1. Open Azure Cloud Shell (https://shell.azure.com)
164+
# 2. Download the script
165+
$scriptUrl = "https://raw.githubusercontent.com/Managed-Solution-LLC/PowerShellEveryting/main/scripts/Office365/New-Office365Accounts.ps1"
166+
Invoke-WebRequest -Uri $scriptUrl -OutFile "./New-Office365Accounts.ps1"
167+
168+
# 3. Prepare your user data
169+
$users = @(
170+
@{FirstName='John'; LastName='Doe'; EmailAddress='john.doe@contoso.com'; UsageLocation='US'}
171+
)
172+
173+
# 4. Run the script
174+
./New-Office365Accounts.ps1 -UserArray $users
175+
176+
# 5. Download the results
177+
# The script will provide the exact download command, e.g.:
178+
# download "/home/user/clouddrive/AccountCreation/AccountCreation_Results_20260122_143052.csv"
179+
```
180+
181+
### Alternative: Clone Repository
182+
```powershell
183+
# Clone entire repository for offline use
184+
git clone https://github.com/Managed-Solution-LLC/PowerShellEveryting.git
185+
cd PowerShellEveryting/scripts/Office365
186+
./New-Office365Accounts.ps1 -CsvPath "path/to/users.csv"
187+
```
188+
137189
## Usage Examples
138190

139191
### Example 1: Basic CSV Import
@@ -460,10 +512,48 @@ for ($i = 0; $i -lt $allUsers.Count; $i += $batchSize) {
460512
}
461513
```
462514

515+
## GitHub Repository Access
516+
517+
### Script Location
518+
**GitHub Repository:** [Managed-Solution-LLC/PowerShellEveryting](https://github.com/Managed-Solution-LLC/PowerShellEveryting)
519+
520+
**Direct Script URL:**
521+
```
522+
https://raw.githubusercontent.com/Managed-Solution-LLC/PowerShellEveryting/main/scripts/Office365/New-Office365Accounts.ps1
523+
```
524+
525+
### Quick Access in Cloud Shell
526+
Azure Cloud Shell has git pre-installed and is ideal for running this script:
527+
528+
```powershell
529+
# Option 1: Download single script
530+
curl -O https://raw.githubusercontent.com/Managed-Solution-LLC/PowerShellEveryting/main/scripts/Office365/New-Office365Accounts.ps1
531+
532+
# Option 2: Clone full repository
533+
git clone https://github.com/Managed-Solution-LLC/PowerShellEveryting.git
534+
cd PowerShellEveryting/scripts/Office365
535+
```
536+
537+
### Benefits of Running from GitHub
538+
-**Always Latest Version** - Get the most recent updates
539+
-**No Local Storage Required** - Perfect for Cloud Shell
540+
-**Quick Testing** - Try before committing to local installation
541+
-**Consistent Environment** - Same script across all machines
542+
-**Easy Updates** - Just re-download to get latest version
543+
544+
### Security Considerations
545+
When running scripts from the internet:
546+
1. **Review the code first** - Check the GitHub repository
547+
2. **Use HTTPS URLs** - Ensures encrypted transfer
548+
3. **Verify the source** - Confirm it's from the official repository
549+
4. **Check commit history** - Review recent changes on GitHub
550+
5. **Use raw.githubusercontent.com** - For direct script downloads
551+
463552
## Related Scripts
464553
- [New-AccountCreationTemplate.ps1](../../scripts/Assessment/Microsoft365/New-AccountCreationTemplate.md) - Generate CSV template
465554
- [Get-QuickO365Report.ps1](Assessments/Microsoft365/Get-QuickO365Report.md) - Tenant assessment
466555
- [Get-MailboxPermissionsReport.ps1](Assessments/Microsoft365/Get-MailboxPermissionsReport.md) - Audit permissions
556+
- [Running Scripts from GitHub Guide](../Running-Scripts-from-GitHub.md) - General guide for all scripts
467557

468558
## Workflow Integration
469559

docs/wiki/_Sidebar.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
- [Get-MailboxRules](Get-MailboxRules)
2525
- [Get-MigrationWizLicensing](Get-MigrationWizLicensing)
2626

27+
### Office 365 Management
28+
- [New-Office365Accounts](Office365/New-Office365Accounts)
29+
2730
### On-Premise Infrastructure
2831
- [Get-ComprehensiveADReport](Get-ComprehensiveADReport)
2932
- [Check-ADMTPrerequisites](Check-ADMTPrerequisites)

docs/wiki/home.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,18 @@ Office 365 tenant assessment and reporting tools:
2424
- **[Get-MailboxRules](Get-MailboxRules)** - Export mailbox rules (forwarding, redirects, auto-replies)
2525
- **[Get-MigrationWizLicensing](Get-MigrationWizLicensing)** - BitTitan MigrationWiz license calculator
2626

27-
### 🖥️ On-Premise Infrastructure Assessments
27+
### � Office 365 User Management
28+
29+
User account creation and management automation:
30+
- **[New-Office365Accounts](Office365/New-Office365Accounts)** - Bulk user account creation with password generation
31+
- CSV batch import or array input
32+
- Automatic secure password generation
33+
- OneDrive provisioning support
34+
- Cloud Shell optimized with persistent storage
35+
- Microsoft 365 or Active Directory support
36+
- Password export to secure timestamped CSV
37+
38+
### �🖥️ On-Premise Infrastructure Assessments
2839

2940
Active Directory and Windows Server assessment tools:
3041
- **[Get-ComprehensiveADReport](Get-ComprehensiveADReport)** - Complete Active Directory assessment for AD to AD migrations
@@ -77,6 +88,23 @@ Microsoft Intune device enrollment and management:
7788

7889
## 🎯 Featured Scripts
7990

91+
### New-Office365Accounts.ps1
92+
Bulk user account creation for Microsoft 365 with automatic password generation, OneDrive provisioning, and Cloud Shell support. Accepts CSV files, arrays, or individual parameters.
93+
94+
**Quick Start:**
95+
```powershell
96+
# From array
97+
$users = @(
98+
@{FirstName='John'; LastName='Doe'; EmailAddress='john.doe@contoso.com'; UsageLocation='US'}
99+
)
100+
.\New-Office365Accounts.ps1 -UserArray $users -InitializeOneDrive
101+
102+
# From Cloud Shell (auto-detects environment)
103+
.\New-Office365Accounts.ps1 -CsvPath "users.csv"
104+
```
105+
106+
[View Documentation →](Office365/New-Office365Accounts)
107+
80108
### Get-QuickO365Report.ps1
81109
Complete Office 365 tenant assessment collecting mailboxes, licenses, OneDrive, SharePoint, Groups, Teams, and permissions. Generates professional Excel workbook with formatted tables.
82110

0 commit comments

Comments
 (0)