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
# This will install the modules PowerCLI and/or ImportExcel on the system if they are missing, if the modules are installed already they will only get updated.
# This will update the modules PowerCLI and ImportExcel and delete all of the old versions that are installed of PowerCLI and ImportExcel and then import the modules.
44
44
45
45
.LINK
@@ -57,10 +57,10 @@
57
57
58
58
[CmdletBinding(SupportsShouldProcess)]
59
59
Param(
60
-
[Parameter(Mandatory=$false,HelpMessage="Enter module or modules (separated with ,) that you want to update, if you don't enter any all of the modules will be updated")]
61
-
[string]$Module,
60
+
[Parameter(Mandatory=$false,HelpMessage="Enter module or modules that you want to update, if you don't enter any, all of the modules will be updated")]
61
+
[string[]]$Module,
62
+
[Parameter(Mandatory=$false,HelpMessage="Enter CurrentUser or AllUsers depending on what scope you want to change your modules, default is CurrentUser")]
62
63
[ValidateSet("CurrentUser","AllUsers")]
63
-
[Parameter(Mandatory=$false,HelpMessage="Enter CurrentUser or AllUsers depending on what scope you want to change your modules")]
64
64
[string]$Scope="CurrentUser",
65
65
[Parameter(Mandatory=$false,HelpMessage="Import modules that has been entered in the module parameter at the end of this function")]
66
66
[switch]$ImportModule=$false,
@@ -125,7 +125,7 @@
125
125
126
126
127
127
# Start looping trough every module that are stored in the string Module
# This will install the modules PowerCLI and/or ImportExcel on the system if they are missing, if the modules are installed already they will only get updated.
# This will update the modules PowerCLI and ImportExcel and delete all of the old versions that are installed of PowerCLI and ImportExcel and then import the modules.
161
161
162
162
.LINK
@@ -174,10 +174,10 @@ Function Update-RSModule {
174
174
175
175
[CmdletBinding(SupportsShouldProcess)]
176
176
Param(
177
-
[Parameter(Mandatory=$false,HelpMessage="Enter module or modules (separated with ,) that you want to update, if you don't enter any all of the modules will be updated")]
178
-
[string]$Module,
177
+
[Parameter(Mandatory=$false,HelpMessage="Enter module or modules that you want to update, if you don't enter any, all of the modules will be updated")]
178
+
[string[]]$Module,
179
+
[Parameter(Mandatory=$false,HelpMessage="Enter CurrentUser or AllUsers depending on what scope you want to change your modules, default is CurrentUser")]
179
180
[ValidateSet("CurrentUser","AllUsers")]
180
-
[Parameter(Mandatory=$false,HelpMessage="Enter CurrentUser or AllUsers depending on what scope you want to change your modules")]
181
181
[string]$Scope="CurrentUser",
182
182
[Parameter(Mandatory=$false,HelpMessage="Import modules that has been entered in the module parameter at the end of this function")]
183
183
[switch]$ImportModule=$false,
@@ -242,7 +242,7 @@ Function Update-RSModule {
242
242
243
243
244
244
# Start looping trough every module that are stored in the string Module
This script let users uninstall older versions of the modules that are installed on the system.
15
15
16
16
17
17
PARAMETERS
18
-
-Module <String>
18
+
-Module <String[]>
19
19
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
20
20
21
21
Required? false
@@ -73,7 +73,7 @@ NOTES
73
73
74
74
-------------------------- EXAMPLE 2 --------------------------
# This will install the modules PowerCLI and/or ImportExcel on the system if they are missing, if the modules are installed already they will only get updated.
129
129
130
130
@@ -134,7 +134,7 @@ NOTES
134
134
135
135
-------------------------- EXAMPLE 4 --------------------------
# This will update the modules PowerCLI and ImportExcel and delete all of the old versions that are installed of PowerCLI and ImportExcel and then import the modules.
0 commit comments