Skip to content

Commit 4af4c9b

Browse files
authored
Merge version 1.2 into main
Merge version 1.2 into main
2 parents f8f116f + a59c9b2 commit 4af4c9b

File tree

10 files changed

+24
-12
lines changed

10 files changed

+24
-12
lines changed

src/ResetLapsPassword 1.1/Data/htcfreek/OsPackages/ResetLapsPassword/1.1/AdmPwd.PSModule/AdmPwd.PS.dll renamed to src/ResetLapsPassword 1.2/Data/htcfreek/OsPackages/ResetLapsPassword/1.2/AdmPwd.PSModule/AdmPwd.PS.dll

File renamed without changes.

src/ResetLapsPassword 1.1/Data/htcfreek/OsPackages/ResetLapsPassword/1.1/AdmPwd.PSModule/AdmPwd.PS.dll-Help.xml renamed to src/ResetLapsPassword 1.2/Data/htcfreek/OsPackages/ResetLapsPassword/1.2/AdmPwd.PSModule/AdmPwd.PS.dll-Help.xml

File renamed without changes.

src/ResetLapsPassword 1.1/Data/htcfreek/OsPackages/ResetLapsPassword/1.1/AdmPwd.PSModule/AdmPwd.PS.format.ps1xml renamed to src/ResetLapsPassword 1.2/Data/htcfreek/OsPackages/ResetLapsPassword/1.2/AdmPwd.PSModule/AdmPwd.PS.format.ps1xml

File renamed without changes.

src/ResetLapsPassword 1.1/Data/htcfreek/OsPackages/ResetLapsPassword/1.1/AdmPwd.PSModule/AdmPwd.PS.psd1 renamed to src/ResetLapsPassword 1.2/Data/htcfreek/OsPackages/ResetLapsPassword/1.2/AdmPwd.PSModule/AdmPwd.PS.psd1

File renamed without changes.

src/ResetLapsPassword 1.1/Data/htcfreek/OsPackages/ResetLapsPassword/1.1/AdmPwd.PSModule/AdmPwd.Utils.dll renamed to src/ResetLapsPassword 1.2/Data/htcfreek/OsPackages/ResetLapsPassword/1.2/AdmPwd.PSModule/AdmPwd.Utils.dll

File renamed without changes.

src/ResetLapsPassword 1.1/Data/htcfreek/OsPackages/ResetLapsPassword/1.1/AdmPwd.PSModule/README.txt renamed to src/ResetLapsPassword 1.2/Data/htcfreek/OsPackages/ResetLapsPassword/1.2/AdmPwd.PSModule/README.txt

File renamed without changes.

src/ResetLapsPassword 1.1/Data/htcfreek/OsPackages/ResetLapsPassword/1.1/Install/Install.ps1 renamed to src/ResetLapsPassword 1.2/Data/htcfreek/OsPackages/ResetLapsPassword/1.2/Install/Install.ps1

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<#
22
Name: ResetLapsPassword
3-
Version: 1.1
3+
Version: 1.2
44
Developer: htcfreek (Heiko Horwedel)
5-
Created at: 30.03.2023
5+
Created at: 04.04.2023
66
Github URL: https://github.com/htcfreek/PreOS-ResetLapsPassword
77
88
Systems requirements:
@@ -25,7 +25,7 @@ Package variables:
2525
If set to 1 the password is reset immediately instead of changing the expiration time.
2626
(Enforced automatically in Azure AD environments, because changing the expiration time is not supported in this scenario.)
2727
28-
Exit-Codes:
28+
Exit codes:
2929
0 : Script executed successful.
3030
501 : Package execution has stopped, because it is running in WinPE.
3131
502 : Operating System is not supported.
@@ -40,11 +40,19 @@ Exit-Codes:
4040
511 : Windows LAPS password reset failed.
4141
512 : Legacy Microsoft LAPS password reset failed.
4242
43+
Log levels:
44+
ERROR : Something that is causing the script to fail.
45+
WARNING : Something that might need some action.
46+
NOTICE : An information that is important.
47+
INFORMATION : Normal execution information. (No prefix in the log text.)
48+
DEBUG : Information needed when analyzing problems. (No prefix in the log text and written to "Host" log only.)
49+
4350
Changes (Date / Version / Author / Change):
4451
2022-11-11 / 0.1 / htcfreek / Initial pre-release version of the package.
4552
2023-01-25 / 0.2 / htcfreek / Complete rewrite of the package with changed variables and behavior.
4653
2023-02-19 / 1.0 / htcfreek / Fix exception for missing LAPS user, comment improvement and first stable release.
4754
2023-03-30 / 1.1 / htcfreek / Fix incorrect detection of missing Windows LAPS on unsupported systems with missing Legacy CSE.; Clean up PXE log in EMC.; Other log improvements (reboot, managed user).
55+
2023-04-04 / 1.2 / htcfreek / Improved reboot behavior on pending Domain join reboot.; Adding a description of the log levels.
4856
4957
#>
5058

@@ -202,7 +210,11 @@ function Update-ClientMgmtConfiguration([int]$IntuneSyncTimeout)
202210
$regNetlogon = Get-ChildItem -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon" -Name
203211
if (($regNetlogon -contains 'JoinDomain') -or ($regNetlogon -contains 'AvoidSpnSet'))
204212
{
205-
ExitWithCodeMessage -errorCode 504 -errorMessage "IMPORTANT: Pending reboot from an Active Directory domain join detected! - Rebooting client ..." -isAbortReboot
213+
WriteLogInfo "NOTICE: Pending reboot from an Active Directory domain join detected! - Reboot required."
214+
215+
# Setting "on error delay" to 5 seconds and exit with error code other than 0 to reboot immediately and restart the package execution.
216+
Set-EmpirumAgentSetting -Key "Matrix42.Platform.Service.Extension.PeAgent.DelayOnErrorInSeconds" -Value 5
217+
ExitWithCodeMessage -errorCode 504 -errorMessage "NOTICE: Rebooting the client, to continue the package execution afterwards ..." -isAbortReboot
206218
}
207219

208220
# If the device is joined to a local Active Directory, then update the GPOs.

src/ResetLapsPassword 1.1/Data/htcfreek/OsPackages/ResetLapsPassword/1.1/LICENSE.txt renamed to src/ResetLapsPassword 1.2/Data/htcfreek/OsPackages/ResetLapsPassword/1.2/LICENSE.txt

File renamed without changes.

src/ResetLapsPassword 1.1/Data/htcfreek/OsPackages/ResetLapsPassword/1.1/README.txt renamed to src/ResetLapsPassword 1.2/Data/htcfreek/OsPackages/ResetLapsPassword/1.2/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
PreOS-Package: ResetLapsPassword
77
Author: Heiko Horwedel (htcfreek)
8-
Version: 1.1
8+
Version: 1.2
99

1010

1111
PACKAGE INFORMATION

src/ResetLapsPassword 1.1/EmpirumPackageData.xml renamed to src/ResetLapsPassword 1.2/EmpirumPackageData.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<EmpirumPackage UUID="88a37929-0b7d-4434-9ee7-1d9f551a4c61" Name="ResetLapsPassword 1.1" Type="OSPackage" Version="1.0">
3-
<VersionInformation Version="1.1" Revision="0" />
2+
<EmpirumPackage UUID="82cea1eb-737d-4a00-a5bb-b838468425b5" Name="ResetLapsPassword 1.2" Type="OSPackage" Version="1.0">
3+
<VersionInformation Version="1.2" Revision="0" />
44
<TargetPath />
55
<Description>This package triggers the reset of the LAPS password for the client on which it is running.</Description>
66
<DatabaseSettings></DatabaseSettings>
@@ -10,8 +10,8 @@
1010
<CatalogueID i:nil="true" />
1111
<GenerallyReleased>0001-01-01T00:00:00</GenerallyReleased>
1212
<Icon i:nil="true" />
13-
<Id>88a37929-0b7d-4434-9ee7-1d9f551a4c61</Id>
14-
<Name>ResetLapsPassword 1.1</Name>
13+
<Id>82cea1eb-737d-4a00-a5bb-b838468425b5</Id>
14+
<Name>ResetLapsPassword 1.2</Name>
1515
<PackageAssignments />
1616
<ProductKey i:nil="true" />
1717
<Revision>0</Revision>
@@ -111,7 +111,7 @@
111111
</SoftwareVarDefinition>
112112
</SoftwareVarDefinitions>
113113
<Vendor>htcfreek</Vendor>
114-
<Version>1.1</Version>
114+
<Version>1.2</Version>
115115
<VersionFile i:nil="true" />
116116
<AllowUnInstallation>false</AllowUnInstallation>
117117
<Author i:nil="true" />
@@ -122,7 +122,7 @@
122122
<CheckReg i:nil="true" />
123123
<CreationDate i:nil="true" />
124124
<Description>This package triggers the reset of the LAPS password for the client on which it is running.</Description>
125-
<Directory>%Packages%\htcfreek\OsPackages\ResetLapsPassword\1.1</Directory>
125+
<Directory>%Packages%\htcfreek\OsPackages\ResetLapsPassword\1.2</Directory>
126126
<Discontinue i:nil="true" />
127127
<DiskFreeApplication>0</DiskFreeApplication>
128128
<DiskFreeSystem>0</DiskFreeSystem>
@@ -141,7 +141,7 @@
141141
<MachineKeyName i:nil="true" />
142142
<Method i:nil="true" />
143143
<MinBandwidth i:nil="true" />
144-
<PackageName>htcfreek\OsPackages\ResetLapsPassword\1.1</PackageName>
144+
<PackageName>htcfreek\OsPackages\ResetLapsPassword\1.2</PackageName>
145145
<ParentID i:nil="true" />
146146
<Path i:nil="true" />
147147
<ProcessorSpeed>0</ProcessorSpeed>

0 commit comments

Comments
 (0)