Skip to content

Commit f1ff790

Browse files
authored
Due to the use of unsupported APIs, we must remove the LocalAccounts module until a better solution is found. (PowerShell#4302)
1 parent 72a8de3 commit f1ff790

10 files changed

Lines changed: 19 additions & 6 deletions

File tree

build.psm1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2961,7 +2961,6 @@ function Start-CrossGen {
29612961
$psCoreAssemblyList += @(
29622962
"Microsoft.WSMan.Management.dll",
29632963
"Microsoft.WSMan.Runtime.dll",
2964-
"Microsoft.PowerShell.LocalAccounts.dll",
29652964
"Microsoft.PowerShell.Commands.Diagnostics.dll",
29662965
"Microsoft.Management.Infrastructure.CimCmdlets.dll"
29672966
)

src/Modules/Windows-Core+Full/Microsoft.PowerShell.LocalAccounts/LocalAccounts.format.ps1xml renamed to src/Modules/Windows-Full/Microsoft.PowerShell.LocalAccounts/LocalAccounts.format.ps1xml

File renamed without changes.

src/Modules/Windows-Core+Full/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.psd1 renamed to src/Modules/Windows-Full/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.psd1

File renamed without changes.

src/powershell-win-core/powershell-win-core.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
<ProjectReference Include="..\Microsoft.PowerShell.SDK\Microsoft.PowerShell.SDK.csproj" />
3434
<ProjectReference Include="..\Microsoft.PowerShell.PSReadLine\Microsoft.PowerShell.PSReadLine.csproj" />
3535
<ProjectReference Include="..\Microsoft.PowerShell.Commands.Diagnostics\Microsoft.PowerShell.Commands.Diagnostics.csproj" />
36-
<ProjectReference Include="..\Microsoft.PowerShell.LocalAccounts\Microsoft.PowerShell.LocalAccounts.csproj" />
3736
<ProjectReference Include="..\Microsoft.Management.Infrastructure.CimCmdlets\Microsoft.Management.Infrastructure.CimCmdlets.csproj" />
3837
<ProjectReference Include="..\Microsoft.WSMan.Management\Microsoft.WSMan.Management.csproj" />
3938
</ItemGroup>

test/fullclr/PowerShellGithubDev.Tests.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ try
4848
# this Describe makes sure we binplace all the files, like psd1, psm1, ps1xml and load usable modules from them
4949
Describe 'Modules for the package' {
5050
Context '$env:DEVPATH Modules loading' {
51+
<#
52+
removed due to #4272
5153
It 'loads Microsoft.PowerShell.LocalAccounts' {
5254
try
5355
{
@@ -59,6 +61,7 @@ try
5961
Remove-Module -ErrorAction SilentlyContinue Microsoft.PowerShell.LocalAccounts
6062
}
6163
}
64+
#>
6265

6366
It 'loads Microsoft.PowerShell.Archive' {
6467
try

test/powershell/Modules/Microsoft.PowerShell.LocalAccounts/Pester.Command.Cmdlets.LocalAccounts.LocalGroup.Tests.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
#
33
# Copyright (c) Microsoft Corporation, 2015
44

5+
# Module removed due to #4272
6+
# disabling tests
7+
8+
return
9+
510
function RemoveTestGroups
611
{
712
param([string] $basename)

test/powershell/Modules/Microsoft.PowerShell.LocalAccounts/Pester.Command.Cmdlets.LocalAccounts.LocalGroupMember.Tests.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
#
33
# Copyright (c) Microsoft Corporation, 2015
44

5+
# Module removed due to #4272
6+
# disabling tests
7+
8+
return
9+
510
function IsWin10OrHigher
611
{
712
$version = [system.environment]::osversion.version

test/powershell/Modules/Microsoft.PowerShell.LocalAccounts/Pester.Command.Cmdlets.LocalAccounts.LocalUser.Tests.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
#
33
# Copyright (c) Microsoft Corporation, 2015
44

5+
# Module removed due to #4272
6+
# disabling tests
7+
8+
return
9+
510
Set-Variable dateInFuture -option Constant -value "12/12/2036 09:00"
611
Set-Variable dateInPast -option Constant -value "12/12/2010 09:00"
712
Set-Variable dateInvalid -option Constant -value "12/12/2016 25:00"

test/powershell/engine/Help/UpdatableHelpSystem.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $powershellCoreModules = @(
1212
"Microsoft.PowerShell.Core"
1313
"Microsoft.PowerShell.Diagnostics"
1414
"Microsoft.PowerShell.Management"
15-
"Microsoft.PowerShell.LocalAccounts"
15+
# "Microsoft.PowerShell.LocalAccounts" removed due to #4274
1616
"Microsoft.PowerShell.Security"
1717
"Microsoft.PowerShell.Utility"
1818
"Microsoft.WsMan.Management"

test/tools/OpenCover/OpenCover.psm1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ function Expand-ZipArchive([string] $Path, [string] $DestinationPath)
232232
Microsoft.PowerShell.PackageManagement 59.77 62.04 Branch:59.77 Sequence:62.04
233233
Microsoft.PackageManagement 41.73 44.47 Branch:41.73 Sequence:44.47
234234
Microsoft.Management.Infrastructure.CimCmdlets 13.20 17.01 Branch:13.20 Sequence:17.01
235-
Microsoft.PowerShell.LocalAccounts 73.15 84.32 Branch:73.15 Sequence:84.32
236235
Microsoft.PackageManagement.MetaProvider.PowerShell 54.79 57.90 Branch:54.79 Sequence:57.90
237236
Microsoft.PackageManagement.NuGetProvider 62.36 65.37 Branch:62.36 Sequence:65.37
238237
Microsoft.PackageManagement.CoreProviders 7.08 7.96 Branch:7.08 Sequence:7.96
@@ -285,7 +284,6 @@ function Get-CodeCoverage
285284
Microsoft.PowerShell.ConsoleHost 36.53 0 38.40 0
286285
Microsoft.PowerShell.CoreCLR.AssemblyLoadContext 53.66 0 95.31 0
287286
Microsoft.PowerShell.CoreCLR.Eventing 28.70 0 36.23 0
288-
Microsoft.PowerShell.LocalAccounts 73.15 0 84.32 0
289287
Microsoft.PowerShell.PackageManagement 59.77 0 62.04 0
290288
Microsoft.PowerShell.PSReadLine 7.12 0 9.94 0
291289
Microsoft.PowerShell.Security 15.17 0 18.16 0
@@ -312,7 +310,6 @@ function Get-CodeCoverage
312310
Microsoft.PowerShell.ConsoleHost 36.53 0 38.40 0
313311
Microsoft.PowerShell.CoreCLR.AssemblyLoadContext 53.66 0 95.31 0
314312
Microsoft.PowerShell.CoreCLR.Eventing 28.70 0 36.23 0
315-
Microsoft.PowerShell.LocalAccounts 73.15 0 84.32 0
316313
Microsoft.PowerShell.PackageManagement 59.77 0 62.04 0
317314
Microsoft.PowerShell.PSReadLine 7.12 0 9.94 0
318315
Microsoft.PowerShell.Security 15.17 0 18.16 0

0 commit comments

Comments
 (0)