Open
Description
Prerequisites
- Ensure you write a short, descriptive title after [Bug] above.
- Make sure to search for any existing issues before filing a new one.
- Verify you are able to reproduce the issue with the latest released version
PSAppDeployToolkit.Tools version
0.2.1
PSAppDeployToolkit version
4.0.3
Describe the bug
Using Convert-ADTDeployment it doesn't convert -SID $UserProfile.SID to $_.SID for Invoke-HKCURegistrySettingsForAllUsers \ Invoke-ADTAllUsersRegistryAction
[Installation] :: Failed to modify the registry hive for User [XXXX\XXXX] with SID [S-1-5-21-111111111-111111111-9999999999-XXXX]
Error Record:
Message : The variable '$UserProfile' cannot be retrieved because it has not been set.
FullyQualifiedErrorId : VariableIsUndefined,Invoke-ADTAllUsersRegistryAction
Steps to reproduce
1.Use Convert-ADTDeployment to an older script that is using invoke-HKCURegistrySettingsForAllUsers with the parameter -SID $UserProfile.SID
2.Run new install
3.Check log.
Environment data
OsName : Microsoft Windows 11 Enterprise
OSDisplayVersion : 23H2
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsProductName : Windows 10 Enterprise
WindowsBuildLabEx : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage : en-US
OsMuiLanguages : {en-US}
KeyboardLayout : en-GB
TimeZone : (UTC+00:00) Dublin, Edinburgh, Lisbon, London
HyperVisorPresent : True
CsPartOfDomain : True
CsPCSystemType : Mobile
Host:
Version: 8.0.11
Architecture: x64
Commit: 9cb3b725e3
RID: win-x64
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download