Thanks for responding friend, copy the information like this:
$UnpinnedList = @('Microsoft Store', 'Outlook')
#
https://github.com/Disassembler0/Win10-Initial-Setup-Script/issues/8#issue-227159084
#
$GetString = @'
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
public static extern IntPtr GetModuleHandle(string lpModuleName);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
internal static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax);
public static string GetString(uint strId) {
IntPtr intPtr = GetModuleHandle("shell32.dll");
StringBuilder sb = new StringBuilder(255);
LoadString(intPtr, strId, sb, sb.Capacity);
return sb.ToString();
}
'@
$string = Add-Type $GetString -PassThru -Name GetStr -Using System.Text
$UnpinFromTaskbar = $string[0]::GetString(5387)
foreach ($App in $UnpinnedList) {
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{ $_.Name -match $App }).Verbs() | `
?{ $_.Name -eq $UnpinFromTaskbar } | %{ $_.DoIt(); $exec = $true }
}
And save it in a file that you name "UnpinFromTaskbar.ps1" and add it to . Create the ISO and when installing, those 2 options and their icons continue to appear. They were not removed or eliminated.
What do you recommend I make a friend? thank you.