-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample-dependency-management.ps1
More file actions
31 lines (24 loc) · 1.42 KB
/
example-dependency-management.ps1
File metadata and controls
31 lines (24 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Example script demonstrating improved dependency management in AzureDataLakeManagement
# Import the module - it will now provide helpful feedback about missing dependencies
Import-Module .\AzureDataLakeManagement\AzureDataLakeManagement.psd1
# Check what dependencies are missing
Test-ModuleDependencies
# To install missing dependencies automatically, you can run:
# Test-ModuleDependencies -AutoInstall
# Or install them manually:
# Install-Module -Name Az.Storage -Force
# Install-Module -Name Microsoft.Graph.Applications -Force
# Install-Module -Name Microsoft.Graph.Users -Force
# Install-Module -Name Microsoft.Graph.Groups -Force
# Install-Module -Name Microsoft.Graph.DirectoryObjects -Force
# The module will now provide better error messages when functions are called without required dependencies
# For example:
# Add-DataLakeFolder -SubscriptionName 'test' -ResourceGroupName 'test' -StorageAccountName 'test' -ContainerName 'test' -FolderPath 'test'
Write-Host "
Dependency Management Features:
- Test-ModuleDependencies: Check which dependencies are available
- Test-ModuleDependencies -AutoInstall: Automatically install missing dependencies
- Install-ModuleDependencies: Install specific dependencies
- Import-ModuleDependencies: Import dependencies with better error handling
The module will automatically check dependencies when imported and provide helpful guidance.
" -ForegroundColor Green