Skip to content

Commit be972e4

Browse files
committed
Add script
1 parent 67c9070 commit be972e4

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

General/Purge-InstalledModules.ps1

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Cleaning up multiple version of modules that are not needed or I wanted to reset.
2+
$Modules = @(
3+
'Az',
4+
'Az.Batch',
5+
'Az.Cdn',
6+
'Az.Compute',
7+
'Az.CosmosDB',
8+
'Az.Databricks',
9+
'Az.DataFactory',
10+
'Az.DataLakeStore',
11+
'Az.FrontDoor',
12+
'Az.FrontDoor',
13+
'Az.KeyVault',
14+
'Az.MachineLearningServices',
15+
'Az.Maintenance',
16+
'Az.Migrate',
17+
'Az.Migration',
18+
'Az.MySql',
19+
'Az.Network',
20+
'Az.Nginx',
21+
'Az.RedisCache'
22+
'Az.Sql',
23+
'Az.SqlVirtualMachine',
24+
'Az.StackHCI',
25+
'Az.StorageMover',
26+
'Az.StorageSync',
27+
'Az.Synapse',
28+
'ClipboardTools',
29+
'Curl2PS',
30+
'F7History',
31+
'Microsoft.Graph',
32+
'Microsoft.Graph.Beta.Applications',
33+
'Microsoft.Graph.Beta.DirectoryObjects',
34+
'Microsoft.Graph.Beta.Groups',
35+
'Microsoft.Graph.Beta.Groups',
36+
'Microsoft.Graph.Beta.Groups',
37+
'Microsoft.Graph.Beta.Identity.DirectoryManagement',
38+
'Microsoft.Graph.Beta.Identity.Governance',
39+
'Microsoft.Graph.Beta.Identity.Governance',
40+
'Microsoft.Graph.Beta.Identity.SignIns',
41+
'Microsoft.Graph.Beta.Reports',
42+
'Microsoft.Graph.Beta.Reports',
43+
'Microsoft.Graph.Beta.Users',
44+
'Microsoft.Graph.Beta.Users',
45+
'Microsoft.Graph.Beta.Users.Actions',
46+
'Microsoft.Graph.Beta.Users.Functions',
47+
'Microsoft.Graph.CrossDeviceExperiences',
48+
'Microsoft.Graph.DeviceManagement.Actions',
49+
'Microsoft.Graph.DeviceManagement.Administration',
50+
'Microsoft.Graph.DeviceManagement.Enrollment',
51+
'Microsoft.Graph.DeviceManagement.Functions',
52+
'Microsoft.Graph.Devices.CorporateManagement',
53+
'Microsoft.Graph.Devices.ServiceAnnouncement',
54+
'OdmApi',
55+
'PSAdvantage'
56+
)
57+
$Modules | ForEach-Object { Write-Output $_ ; Uninstall-Module $_ -Force -AllVersions -AllowPrerelease -ErrorAction SilentlyContinue }
58+
Get-InstalledModule | Format-Table Version, Name

0 commit comments

Comments
 (0)