Skip to content

Commit 8211c64

Browse files
committed
Add SkipDotNet to Redo-LTService
1 parent da9c021 commit 8211c64

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

LabTech.psm1

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,9 @@ Function Redo-LTService{
13321332
.PARAMETER Rename
13331333
This will call Rename-LTAddRemove to rename the install in Add/Remove Programs
13341334
1335+
.PARAMETER SkipDotNet
1336+
This will disable the error checking for the .NET 3.5 and .NET 2.0 frameworks during the install process.
1337+
13351338
.PARAMETER Force
13361339
This will force operation on an agent detected as a probe.
13371340
@@ -1367,6 +1370,9 @@ Function Redo-LTService{
13671370
Added support for -Force parameter to override probe detection.
13681371
Updated support of -WhatIf parameter.
13691372
1373+
Update Date: 2/22/2019
1374+
Purpose/Change: Added -SkipDotNet parameter.
1375+
Allows for skipping of .NET 3.5 and 2.0 framework checks for installing on OS with .NET 4.0+ already installed
13701376
.LINK
13711377
http://labtechconsulting.com
13721378
#>
@@ -1387,6 +1393,7 @@ Function Redo-LTService{
13871393
[Parameter()]
13881394
[AllowNull()]
13891395
[string]$Rename,
1396+
[switch]$SkipDotNet,
13901397
[switch]$Force
13911398
)
13921399

@@ -1480,7 +1487,18 @@ Function Redo-LTService{
14801487

14811488
Write-Verbose "Starting: Install-LTService -Server $($ServerList -join ',') $PasswordArg -LocationID $LocationID -Hide:`$$($Hide) $RenameArg"
14821489
Try{
1483-
Install-LTService -Server $ServerList -ServerPassword $ServerPassword -LocationID $LocationID -Hide:$Hide -Rename $Rename -Force
1490+
$InstallLTServiceParams = @{
1491+
Server = $ServerList
1492+
ServerPassword = $ServerPassword
1493+
LocationID = $LocationID
1494+
Hide = $Hide
1495+
Rename = $Rename
1496+
Force = $true
1497+
}
1498+
if ($SkipDotNet) {
1499+
$InstallLTServiceParams.SkipDotNet = $true
1500+
}
1501+
Install-LTService @InstallLTServiceParams
14841502
}#End Try
14851503

14861504
Catch{

0 commit comments

Comments
 (0)