You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MaintainModule/MaintainModule.psd1
+5-6Lines changed: 5 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
<#
1
+
<#
2
2
Copyright (C) 2022 Robin Stolpe
3
3
<https://stolpe.io>
4
4
This program is free software: you can redistribute it and/or modify
@@ -27,7 +27,7 @@
27
27
RootModule='.\MaintainModule.psm1'
28
28
29
29
# Version number of this module.
30
-
ModuleVersion='0.0.6'
30
+
ModuleVersion='0.0.7'
31
31
32
32
# Supported PSEditions
33
33
# CompatiblePSEditions = @()
@@ -84,7 +84,7 @@
84
84
# NestedModules = @()
85
85
86
86
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
Copy file name to clipboardExpand all lines: MaintainModule/MaintainModule.psm1
+96-82Lines changed: 96 additions & 82 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
<#
1
+
FunctionUninstall-RSModule {
2
+
<#
2
3
Copyright (C) 2022 Robin Stolpe
3
4
<https://stolpe.io>
4
5
This program is free software: you can redistribute it and/or modify
@@ -11,9 +12,102 @@
11
12
GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License
13
14
along with this program. If not, see <https://www.gnu.org/licenses/>.
14
-
#>
15
+
#>
16
+
#
17
+
<#
18
+
.SYNOPSIS
19
+
Uninstall older versions of your modules in a easy way.
20
+
21
+
.DESCRIPTION
22
+
This script let users uninstall older versions of the modules that are installed on the system.
23
+
24
+
.PARAMETERModule
25
+
Specify modules that you want to uninstall older versions from, if this is left empty all of the older versions of the systems modules will be uninstalled
26
+
27
+
.EXAMPLE
28
+
Uninstall-RSModule -Module "VMWare.PowerCLI"
29
+
# This will uninstall all older versions of the module VMWare.PowerCLI system.
Write-Output"Version $($Version) of $($m) are now uninstalled!"
80
+
}
81
+
catch {
82
+
Write-Error"$($PSItem.Exception)"
83
+
continue
84
+
}
85
+
}
86
+
}
87
+
Write-Output"All older versions of $($m) are now uninstalled, the only installed version of $($m) is $($MostRecentVersion)"
88
+
}
89
+
else {
90
+
Write-Verbose"$($m) don't have any older versions installed then the most current one, no need to uninstall anything."
91
+
}
92
+
}
93
+
Write-Output"`n---/// Script Finished! ///---"
94
+
}
16
95
FunctionUpdate-RSModule {
96
+
<#
97
+
Copyright (C) 2022 Robin Stolpe
98
+
<https://stolpe.io>
99
+
This program is free software: you can redistribute it and/or modify
100
+
it under the terms of the GNU General Public License as published by
101
+
the Free Software Foundation, either version 3 of the License, or
102
+
(at your option) any later version.
103
+
This program is distributed in the hope that it will be useful,
104
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
105
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
106
+
GNU General Public License for more details.
107
+
You should have received a copy of the GNU General Public License
108
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
109
+
#>
110
+
#
17
111
<#
18
112
.SYNOPSIS
19
113
This module let you maintain your installed modules in a easy way.
@@ -229,83 +323,3 @@ Function Update-RSModule {
229
323
}
230
324
Write-Output"`n---/// Script Finished! ///---"
231
325
}
232
-
233
-
FunctionUninstall-RSModule {
234
-
<#
235
-
.SYNOPSIS
236
-
Uninstall older versions of your modules in a easy way.
237
-
238
-
.DESCRIPTION
239
-
This script let users uninstall older versions of the modules that are installed on the system.
240
-
241
-
.PARAMETERModule
242
-
Specify modules that you want to uninstall older versions from, if this is left empty all of the older versions of the systems modules will be uninstalled
243
-
244
-
.EXAMPLE
245
-
Uninstall-RSModule -Module "VMWare.PowerCLI"
246
-
# This will uninstall all older versions of the module VMWare.PowerCLI system.
0 commit comments