diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/AddContentCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/AddContentCommand.cs
index d5084f0515..f0b3d1cbe8 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/AddContentCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/AddContentCommand.cs
@@ -4,9 +4,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.Management.Automation;
-using System.Management.Automation.Provider;
using System.Management.Automation.Internal;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearContentCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearContentCommand.cs
index d4bab8957a..b5b05f4a98 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearContentCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearContentCommand.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearPropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearPropertyCommand.cs
index 96d9376609..7f9237aa83 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearPropertyCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearPropertyCommand.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/CombinePathCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/CombinePathCommand.cs
index e854f0ac63..9aa673126b 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/CombinePathCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/CombinePathCommand.cs
@@ -3,7 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/CommandsCommon.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/CommandsCommon.cs
index 5f0b89c409..53998eafbc 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/CommandsCommon.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/CommandsCommon.cs
@@ -4,7 +4,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Management.Automation;
-using System.Management.Automation.Internal;
namespace Microsoft.PowerShell.Commands
{
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/CommitTransactionCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/CommitTransactionCommand.cs
index 72bd41af98..616d20b2b0 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/CommitTransactionCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/CommitTransactionCommand.cs
@@ -2,9 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
-using System.Management.Automation.Provider;
using Dbg = System.Management.Automation;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/ControlPanelItemCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/ControlPanelItemCommand.cs
index 89d0cce047..ac4f99f1fd 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/ControlPanelItemCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/ControlPanelItemCommand.cs
@@ -6,7 +6,6 @@ using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using Microsoft.Win32;
-using Shell32;
using System;
using System.Management.Automation;
using System.Management.Automation.Internal;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/ConvertPathCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/ConvertPathCommand.cs
index 489cac8518..8228aa22f2 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/ConvertPathCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/ConvertPathCommand.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/CopyPropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/CopyPropertyCommand.cs
index 9f1549286b..69cbc9b8a9 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/CopyPropertyCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/CopyPropertyCommand.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetChildrenCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetChildrenCommand.cs
index 9f370de67d..b219428732 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetChildrenCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetChildrenCommand.cs
@@ -3,13 +3,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
-using System.Collections.ObjectModel;
-using System.Text;
using System.Management.Automation;
-using System.Reflection;
-using System.Resources;
-using System.Threading;
using Dbg = System.Management.Automation;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs
index 5deed95ae8..7354f58d76 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs
@@ -5,7 +5,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.IO;
using System.Management.Automation;
using System.Management.Automation.Internal;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetPropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetPropertyCommand.cs
index 874f8de23e..7ec7ca11de 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetPropertyCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetPropertyCommand.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetTransactionCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetTransactionCommand.cs
index 084e78ddef..ff47b4777a 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetTransactionCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetTransactionCommand.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Navigation.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Navigation.cs
index c0663908ff..23631e4293 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Navigation.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Navigation.cs
@@ -8,7 +8,6 @@ using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Management.Automation.Provider;
-using System.Threading;
using Dbg = System.Management.Automation;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs
index 0d5cc8b5d1..327e9b5c78 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughContentCommandBase.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughContentCommandBase.cs
index 0164d645ba..4d4328eed4 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughContentCommandBase.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughContentCommandBase.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughPropertyCommandBase.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughPropertyCommandBase.cs
index b1fd3f2881..71c51d2457 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughPropertyCommandBase.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughPropertyCommandBase.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/PingPathCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/PingPathCommand.cs
index d08f7ae422..cd9a35567e 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/PingPathCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/PingPathCommand.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/PropertyCommandBase.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/PropertyCommandBase.cs
index 159e0c8297..bd707d4cc2 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/PropertyCommandBase.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/PropertyCommandBase.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/RemovePropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/RemovePropertyCommand.cs
index 0082f9ec3c..9bb05626df 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/RemovePropertyCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/RemovePropertyCommand.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/RenamePropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/RenamePropertyCommand.cs
index e1279b3984..28af7a8bea 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/RenamePropertyCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/RenamePropertyCommand.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Dbg = System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/RollbackTransactionCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/RollbackTransactionCommand.cs
index fa9a3c4be1..1d33e51189 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/RollbackTransactionCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/RollbackTransactionCommand.cs
@@ -2,9 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
-using System.Management.Automation.Provider;
using Dbg = System.Management.Automation;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/SetContentCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/SetContentCommand.cs
index d806b9da8f..3c404aa981 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/SetContentCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/SetContentCommand.cs
@@ -2,10 +2,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using System.Management.Automation.Internal;
-using System.Management.Automation.Provider;
using Dbg = System.Management.Automation;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/UseTransactionCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/UseTransactionCommand.cs
index 84d9b1fc0d..6d7d2b6b98 100644
--- a/src/Microsoft.PowerShell.Commands.Management/commands/management/UseTransactionCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/UseTransactionCommand.cs
@@ -5,7 +5,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Management.Automation;
using System.Management.Automation.Internal;
-using System.Management.Automation.Provider;
using Dbg = System.Management.Automation;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Management/singleshell/installer/MshManagementMshSnapin.cs b/src/Microsoft.PowerShell.Commands.Management/singleshell/installer/MshManagementMshSnapin.cs
index 49166075be..bb9a99944f 100644
--- a/src/Microsoft.PowerShell.Commands.Management/singleshell/installer/MshManagementMshSnapin.cs
+++ b/src/Microsoft.PowerShell.Commands.Management/singleshell/installer/MshManagementMshSnapin.cs
@@ -2,15 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.ComponentModel;
-using System.Configuration.Install;
-using System.Reflection;
-using Microsoft.Win32;
-using System.IO;
using System.Management.Automation;
namespace Microsoft.PowerShell
diff --git a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
index 61dda37869..3f68e6d838 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
+++ b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj
@@ -42,6 +42,12 @@
+
+ C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Drawing.dll
+
+
+ C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Numerics.dll
+
@@ -253,4 +259,4 @@
-
+
\ No newline at end of file
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/HeaderInfo.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/HeaderInfo.cs
index 0e904588cb..b048eeddea 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/HeaderInfo.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/HeaderInfo.cs
@@ -5,9 +5,7 @@
namespace Microsoft.PowerShell.Commands
{
using System;
- using System.Collections;
using System.Collections.Generic;
- using System.Globalization;
using System.Management.Automation;
internal class HeaderInfo
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OriginalColumnInfo.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OriginalColumnInfo.cs
index f64e272b0c..f1737bbaf4 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OriginalColumnInfo.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OriginalColumnInfo.cs
@@ -6,7 +6,6 @@ namespace Microsoft.PowerShell.Commands
{
using System;
using System.Collections;
- using System.Globalization;
using System.Management.Automation;
using Microsoft.PowerShell.Commands.Internal.Format;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutGridViewCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutGridViewCommand.cs
index 06cca58ad1..0565234818 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutGridViewCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutGridViewCommand.cs
@@ -7,16 +7,11 @@ namespace Microsoft.PowerShell.Commands
using System;
using System.Collections;
using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Globalization;
- using System.Reflection;
- using System.Threading;
using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Management.Automation.Runspaces;
using Microsoft.PowerShell.Commands.Internal.Format;
- using Microsoft.Win32;
///
/// Enum for SelectionMode parameter.
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutWindowProxy.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutWindowProxy.cs
index 0b89517ee4..5622f0532e 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutWindowProxy.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/OutGridView/OutWindowProxy.cs
@@ -6,14 +6,11 @@ namespace Microsoft.PowerShell.Commands
{
using System;
using System.Collections.Generic;
- using System.Globalization;
using System.IO;
using System.Threading;
using System.Reflection;
using System.Management.Automation;
using System.Management.Automation.Internal;
- using System.Management.Automation.Runspaces;
-
using Microsoft.PowerShell.Commands.Internal.Format;
internal class OutWindowProxy : IDisposable
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/common/GetFormatDataCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/common/GetFormatDataCommand.cs
index 890ca59ce8..ba65208c14 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/common/GetFormatDataCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/common/GetFormatDataCommand.cs
@@ -8,7 +8,6 @@ using System.Management.Automation;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Management.Automation.Runspaces;
-using System.Management.Automation.Tracing;
using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-list/Format-List.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-list/Format-List.cs
index 19a2046529..e552ef22e9 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-list/Format-List.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-list/Format-List.cs
@@ -2,8 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Management.Automation;
using Microsoft.PowerShell.Commands.Internal.Format;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-object/format-object.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-object/format-object.cs
index 2459882dd5..a7d1672ba3 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-object/format-object.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-object/format-object.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Microsoft.PowerShell.Commands.Internal.Format;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-table/Format-Table.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-table/Format-Table.cs
index 2b4eca9e85..4ad89e89ea 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-table/Format-Table.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-table/Format-Table.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Microsoft.PowerShell.Commands.Internal.Format;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/PrinterLineOutput.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/PrinterLineOutput.cs
index 9f75b849ef..82f8fbb991 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/PrinterLineOutput.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/PrinterLineOutput.cs
@@ -3,8 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.IO;
-using System.Text;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Printing;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/out-printer.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/out-printer.cs
index 6edd7a7a2f..f860879a8e 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/out-printer.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-printer/out-printer.cs
@@ -2,17 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
-using System.Collections.ObjectModel;
-using System.Reflection;
-using System.Globalization;
using System.Management.Automation;
-using System.IO;
-
-using System.Drawing;
-using System.Drawing.Printing;
-
using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetHostCmdlet.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetHostCmdlet.cs
index 06109519ff..dbcf4c3a09 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetHostCmdlet.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetHostCmdlet.cs
@@ -3,8 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-
-using System;
using System.Management.Automation;
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetMember.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetMember.cs
index ddfa5ea739..d7c5af7860 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetMember.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetMember.cs
@@ -8,7 +8,6 @@ using System.Collections.Specialized;
using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Reflection;
-using System.Text;
namespace Microsoft.PowerShell.Commands
{
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetRandomCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetRandomCommand.cs
index bc053499a4..b0eab18c1a 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetRandomCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetRandomCommand.cs
@@ -8,8 +8,8 @@ using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
-using System.Threading;
using System.Numerics;
+using System.Threading;
using Debug = System.Management.Automation.Diagnostics;
using System.Security.Cryptography;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Import-LocalizedData.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Import-LocalizedData.cs
index a1d067404d..c6d8aa71f5 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Import-LocalizedData.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Import-LocalizedData.cs
@@ -7,7 +7,6 @@ using System.Globalization;
using System.IO;
using System.Management.Automation.Internal;
using System.Management.Automation;
-using System.Text;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Send-MailMessage.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Send-MailMessage.cs
index 33cb4e1516..23673cb0c3 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Send-MailMessage.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Send-MailMessage.cs
@@ -3,20 +3,11 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.IO;
-using System.Net;
using System.Text;
-using System.Collections;
using System.Globalization;
using System.Net.Mail;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
-using System.Runtime.InteropServices;
-
using System.Management.Automation;
-using System.Management.Automation.Internal;
-using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs
index 447749110c..97b443b0ab 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs
@@ -10,7 +10,6 @@ namespace Microsoft.PowerShell.Commands
using System.Collections.ObjectModel;
using System.Globalization;
using System.Management.Automation;
- using System.Management.Automation.Internal;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandCommandInfo.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandCommandInfo.cs
index a8e54ebe97..1b6f15999d 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandCommandInfo.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandCommandInfo.cs
@@ -7,10 +7,6 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
{
using System;
using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.ComponentModel;
- using System.Diagnostics.CodeAnalysis;
- using System.Globalization;
using System.Linq;
using System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandModuleInfo.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandModuleInfo.cs
index 6c13d206f5..d8e47bee38 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandModuleInfo.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandModuleInfo.cs
@@ -6,12 +6,6 @@
namespace Microsoft.PowerShell.Commands.ShowCommandExtension
{
using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.ComponentModel;
- using System.Diagnostics.CodeAnalysis;
- using System.Globalization;
- using System.Linq;
using System.Management.Automation;
///
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterInfo.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterInfo.cs
index c7ef23dbc7..2e72c44039 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterInfo.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterInfo.cs
@@ -7,10 +7,6 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
{
using System;
using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.ComponentModel;
- using System.Diagnostics.CodeAnalysis;
- using System.Globalization;
using System.Linq;
using System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterSetInfo.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterSetInfo.cs
index 432c4a2cee..891eae1ea9 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterSetInfo.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterSetInfo.cs
@@ -7,10 +7,6 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
{
using System;
using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.ComponentModel;
- using System.Diagnostics.CodeAnalysis;
- using System.Globalization;
using System.Linq;
using System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterType.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterType.cs
index a0f3bbc72c..1cdd905619 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterType.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandParameterType.cs
@@ -8,12 +8,6 @@ namespace Microsoft.PowerShell.Commands.ShowCommandExtension
{
using System;
using System.Collections;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.ComponentModel;
- using System.Diagnostics.CodeAnalysis;
- using System.Globalization;
- using System.Linq;
using System.Management.Automation;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandProxy.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandProxy.cs
index c6c440a42b..e691678d81 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandProxy.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandProxy.cs
@@ -7,12 +7,8 @@ namespace Microsoft.PowerShell.Commands
{
using System;
using System.Collections.Generic;
- using System.Diagnostics.CodeAnalysis;
- using System.Globalization;
- using System.IO;
using System.Management.Automation;
using System.Management.Automation.Internal;
- using System.Reflection;
using System.Threading;
using System.Collections.ObjectModel;
using Microsoft.PowerShell.Commands.ShowCommandExtension;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-Data.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-Data.cs
index dc9316dbe0..ac21173113 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-Data.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-Data.cs
@@ -5,8 +5,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Management.Automation;
using System.Collections.ObjectModel;
-using System.Management.Automation.Runspaces;
-using System.Management.Automation.Provider;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-TypeData.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-TypeData.cs
index 73c3174241..37ee962694 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-TypeData.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Update-TypeData.cs
@@ -7,7 +7,6 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.Reflection;
-using System.Threading;
using System.Management.Automation;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/UtilityCommon.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/UtilityCommon.cs
index ca46d5d9be..1b67ba01c9 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/UtilityCommon.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/UtilityCommon.cs
@@ -7,7 +7,6 @@ using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Text;
using System.Diagnostics.CodeAnalysis;
-using System.Collections.Generic;
using System.Globalization;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertFromJsonCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertFromJsonCommand.cs
index 7c89579d57..c83349555b 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertFromJsonCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertFromJsonCommand.cs
@@ -6,7 +6,6 @@ using System;
using System.Collections.Generic;
using System.Management.Automation;
using System.Reflection;
-using System.Text;
namespace Microsoft.PowerShell.Commands
{
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/FormObject.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/FormObject.cs
index d815a3e49f..1ae2083a5d 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/FormObject.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/FormObject.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/JsonObject.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/JsonObject.cs
index 159328d052..04bb9bef4a 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/JsonObject.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/JsonObject.cs
@@ -7,14 +7,13 @@ using System.Collections.Generic;
using System.Globalization;
using System.Diagnostics.CodeAnalysis;
using System.Management.Automation;
-using System.IO;
-using System.Reflection;
-using System.Collections.ObjectModel;
-using System.Management.Automation.Internal;
-
#if CORECLR
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Management.Automation.Internal;
+using System.Reflection;
#else
using System.Web.Script.Serialization;
using System.Collections.Specialized;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/WebCmdletElementCollection.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/WebCmdletElementCollection.cs
index 3989a5785e..1c9e6f496a 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/WebCmdletElementCollection.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/WebCmdletElementCollection.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Collections.Generic;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WriteConsoleCmdlet.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WriteConsoleCmdlet.cs
index b98a545f6b..2bd40fc6da 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WriteConsoleCmdlet.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/WriteConsoleCmdlet.cs
@@ -5,7 +5,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Management.Automation;
using System.Collections;
-using System.Collections.Generic;
using System.Text;
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/convert-HTML.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/convert-HTML.cs
index 0810d5549f..420dd9cd7d 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/convert-HTML.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/convert-HTML.cs
@@ -7,11 +7,9 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics.CodeAnalysis;
-using System.IO;
using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Net;
-using System.Reflection;
using System.Text;
using Microsoft.PowerShell.Commands.Internal.Format;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/MshHostTraceListener.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/MshHostTraceListener.cs
index d7cc4aed0a..1211f0b400 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/MshHostTraceListener.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/MshHostTraceListener.cs
@@ -3,10 +3,8 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.IO;
using System.Text;
using System.Management.Automation;
-using System.Management.Automation.Host;
using System.Management.Automation.Internal.Host;
#if CORECLR
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceCommandBase.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceCommandBase.cs
index 1dfb756b61..c927c11fc8 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceCommandBase.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceCommandBase.cs
@@ -5,7 +5,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.Diagnostics;
using System.Management.Automation;
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs
index 69348b9488..362cb4b6f4 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs
@@ -3,7 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/singleshell/installer/MshUtilityMshSnapin.cs b/src/Microsoft.PowerShell.Commands.Utility/singleshell/installer/MshUtilityMshSnapin.cs
index 9920e6b9c5..a222fdfcc9 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/singleshell/installer/MshUtilityMshSnapin.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/singleshell/installer/MshUtilityMshSnapin.cs
@@ -2,15 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.ComponentModel;
-using System.Configuration.Install;
-using System.Reflection;
-using Microsoft.Win32;
-using System.IO;
using System.Management.Automation;
namespace Microsoft.PowerShell
diff --git a/src/Microsoft.PowerShell.ConsoleHost/AssemblyInfo.cs b/src/Microsoft.PowerShell.ConsoleHost/AssemblyInfo.cs
index 048403f358..fe175aaf47 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/AssemblyInfo.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/AssemblyInfo.cs
@@ -1,10 +1,9 @@
-using System.Diagnostics.CodeAnalysis;
using System.Reflection;
-using System.Resources;
using System.Runtime.CompilerServices;
#if !CORECLR
using System.Runtime.ConstrainedExecution;
-using System.Security.Permissions;
+#else
+using System.Resources;
#endif
[assembly: InternalsVisibleTo("powershell-tests,PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
index b0bac1649c..02b0a2c03a 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs
@@ -8,14 +8,11 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Globalization;
using System.IO;
-using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
-using System.Management.Automation.Host;
using System.Management.Automation.Internal;
using System.Diagnostics;
-using Microsoft.Win32;
using Dbg = System.Management.Automation.Diagnostics;
namespace Microsoft.PowerShell
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
index 9d44553d5f..2c2779b9d9 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
@@ -22,7 +22,6 @@ using System.Management.Automation.Remoting;
using System.Management.Automation.Security;
using System.Threading;
using System.Runtime.InteropServices;
-using Microsoft.Win32.SafeHandles;
using System.Management.Automation.Language;
#if CORECLR
using Microsoft.PowerShell.CoreClr.Stubs;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs
index ca1726418e..966e81b30f 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs
@@ -6,12 +6,9 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
-using System.Runtime.InteropServices;
-using System.Collections;
using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Management.Automation.Host;
-using System.Reflection;
using System.ComponentModel;
using System.Globalization;
using System.Security.Principal;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostTranscript.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostTranscript.cs
index eb77ed1da2..49c940f5c9 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostTranscript.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostTranscript.cs
@@ -5,15 +5,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
-using System.Text;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
using System.IO;
-using System.Reflection;
-using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Internal;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceProgress.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceProgress.cs
index 66f2198a08..d273c3d06a 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceProgress.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceProgress.cs
@@ -5,11 +5,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
-using System.Collections;
-using System.Collections.Generic;
using System.Management.Automation;
-using System.Management.Automation.Host;
-
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePrompt.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePrompt.cs
index 0983adeefe..7e619d51c0 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePrompt.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePrompt.cs
@@ -14,8 +14,6 @@ using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Management.Automation.Host;
using System.Security;
-using System.Reflection;
-
using Dbg = System.Management.Automation.Diagnostics;
using InternalHostUserInterface = System.Management.Automation.Internal.Host.InternalHostUserInterface;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePromptForChoice.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePromptForChoice.cs
index 10918e18b9..e01f1a7359 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePromptForChoice.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePromptForChoice.cs
@@ -6,7 +6,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Globalization;
-using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceSecurity.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceSecurity.cs
index f5e46f884a..bff6255942 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceSecurity.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceSecurity.cs
@@ -3,13 +3,9 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Text;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
using System.Security;
using System.Management.Automation;
using System.Management.Automation.Internal;
-using System.Threading;
using Microsoft.Win32;
using System.Globalization;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleShell.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleShell.cs
index 04841952c4..d53989aa42 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleShell.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleShell.cs
@@ -3,9 +3,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System.Management.Automation;
-using System.Management.Automation.Host;
using System.Management.Automation.Runspaces;
-using Microsoft.PowerShell;
namespace Microsoft.PowerShell
{
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleTextWriter.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleTextWriter.cs
index 0e036a7b31..eb6a976e8f 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleTextWriter.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleTextWriter.cs
@@ -7,15 +7,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Text;
using System.IO;
-using System.Management.Automation;
-using System.Management.Automation.Host;
-using System.Management.Automation.Internal;
-using Microsoft.PowerShell;
-using System.Threading;
-using System.Runtime.InteropServices;
-using Microsoft.Win32.SafeHandles;
-
-
using Dbg = System.Management.Automation.Diagnostics;
using ConsoleHandle = Microsoft.Win32.SafeHandles.SafeFileHandle;
using HRESULT = System.UInt32;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/Executor.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/Executor.cs
index 6099d13715..d9788e8a60 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/Executor.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/Executor.cs
@@ -3,15 +3,9 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.IO;
-using System.Text;
-using System.Collections;
using System.Collections.ObjectModel;
-using System.Globalization;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
-using System.Collections.Generic;
-using System.Xml;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ManagedEntrance.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ManagedEntrance.cs
index 5bbacac4f0..0ab20d3329 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ManagedEntrance.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ManagedEntrance.cs
@@ -3,13 +3,14 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Threading;
using System.Reflection;
using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Management.Automation.Runspaces;
using System.Management.Automation.Tracing;
+#if CORECLR
using System.Runtime.InteropServices;
+#endif
namespace Microsoft.PowerShell
{
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs
index 8dc81cb994..0b743d5f82 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs
@@ -6,7 +6,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections;
-using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Internal;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressPane.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressPane.cs
index 99a394964f..cf35863647 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressPane.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressPane.cs
@@ -5,8 +5,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
-using System.Collections;
-using System.Collections.Generic;
using System.Management.Automation.Host;
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/Serialization.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/Serialization.cs
index dee2023930..d0a177c352 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/Serialization.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/Serialization.cs
@@ -3,12 +3,8 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Text;
using System.IO;
using System.Management.Automation;
-using System.Management.Automation.Host;
-using System.Management.Automation.Internal;
-using Microsoft.PowerShell;
using System.Xml;
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/StartTranscriptCmdlet.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/StartTranscriptCmdlet.cs
index 7bf9681639..e27cf55c54 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/StartTranscriptCmdlet.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/StartTranscriptCmdlet.cs
@@ -9,8 +9,6 @@ using System.Collections.ObjectModel;
using System.IO;
using System.Management.Automation;
using System.Management.Automation.Internal;
-using System.Management.Automation.Internal.Host;
-
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/StopTranscriptCmdlet.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/StopTranscriptCmdlet.cs
index deb3960cbe..1bbb3d8b71 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/StopTranscriptCmdlet.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/StopTranscriptCmdlet.cs
@@ -7,9 +7,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Management.Automation;
using System.Management.Automation.Internal;
-using System.Management.Automation.Internal.Host;
-
-
namespace Microsoft.PowerShell.Commands
diff --git a/src/Microsoft.PowerShell.ConsoleHost/singleshell/installer/EngineInstaller.cs b/src/Microsoft.PowerShell.ConsoleHost/singleshell/installer/EngineInstaller.cs
index bcc5467e64..47285d079d 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/singleshell/installer/EngineInstaller.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/singleshell/installer/EngineInstaller.cs
@@ -3,15 +3,10 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.ComponentModel;
-using System.Configuration.Install;
using System.Reflection;
-using Microsoft.Win32;
using System.IO;
-using System.Management.Automation.Runspaces;
using System.Management.Automation;
namespace Microsoft.PowerShell
diff --git a/src/Microsoft.PowerShell.ConsoleHost/singleshell/installer/MshHostMshSnapin.cs b/src/Microsoft.PowerShell.ConsoleHost/singleshell/installer/MshHostMshSnapin.cs
index 615d5dfc26..cdf884e939 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/singleshell/installer/MshHostMshSnapin.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/singleshell/installer/MshHostMshSnapin.cs
@@ -2,15 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.ComponentModel;
-using System.Configuration.Install;
-using System.Reflection;
-using Microsoft.Win32;
-using System.IO;
using System.Management.Automation;
namespace Microsoft.PowerShell
diff --git a/src/System.Management.Automation/DscSupport/CimDSCParser.cs b/src/System.Management.Automation/DscSupport/CimDSCParser.cs
index a1725bff00..2a2da8a05b 100644
--- a/src/System.Management.Automation/DscSupport/CimDSCParser.cs
+++ b/src/System.Management.Automation/DscSupport/CimDSCParser.cs
@@ -13,8 +13,6 @@ using System.IO;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Language;
-using System.Management.Automation.Runspaces;
-using System.Management.Automation.Security;
using System.Runtime.InteropServices;
using System.Reflection;
using System.Text;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseCommand.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseCommand.cs
index 361566b3ed..ba2bb83631 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseCommand.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseCommand.cs
@@ -4,9 +4,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Management.Automation;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.Management.Automation.Internal;
using System.Management.Automation.Language;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseFormattingCommandParameters.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseFormattingCommandParameters.cs
index 4a8864d0b3..88d65c8e97 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseFormattingCommandParameters.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseFormattingCommandParameters.cs
@@ -5,10 +5,8 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Management.Automation.Internal;
-using System.ComponentModel;
namespace Microsoft.PowerShell.Commands.Internal.Format
{
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseOutputtingCommand.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseOutputtingCommand.cs
index eb5f6dbfa9..e96bac5ee9 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseOutputtingCommand.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/BaseOutputtingCommand.cs
@@ -3,10 +3,8 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
using System.Collections.Specialized;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Management.Automation.Internal;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/ColumnWidthManager.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/ColumnWidthManager.cs
index fd23f79f4e..c2df10416d 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/ColumnWidthManager.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/ColumnWidthManager.cs
@@ -2,8 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-
namespace Microsoft.PowerShell.Commands.Internal.Format
{
///
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/commands.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/commands.cs
index 677a0ef215..6fd6a83d96 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/commands.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/commands.cs
@@ -3,12 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.IO;
-using System.Xml;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Management.Automation;
-
using Microsoft.PowerShell.Commands.Internal.Format;
namespace Microsoft.PowerShell.Commands
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionDataMethods.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionDataMethods.cs
index e68de768e4..2553ddeb16 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionDataMethods.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionDataMethods.cs
@@ -2,10 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
namespace Microsoft.PowerShell.Commands.Internal.Format
{
#region Type Info Database
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionData_List.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionData_List.cs
index 9d612673f1..d44e5647b8 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionData_List.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionData_List.cs
@@ -6,7 +6,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
// containing display and formatting information
using System.Collections.Generic;
-using System.Xml;
using Microsoft.PowerShell.Commands;
using Microsoft.PowerShell.Commands.Internal.Format;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionData_Misc.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionData_Misc.cs
index 65290f5968..b5a2075e63 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionData_Misc.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/displayDescriptionData_Misc.cs
@@ -5,10 +5,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
// this file contains the data structures for the in memory database
// containing display and formatting information
-using System;
-using System.Collections;
-using System.Collections.ObjectModel;
-
namespace Microsoft.PowerShell.Commands.Internal.Format
{
///
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataManager.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataManager.cs
index bbb57af17c..0e8b8405ab 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataManager.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataManager.cs
@@ -3,17 +3,10 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.Xml;
-using System.Reflection;
using System.IO;
-using System.Diagnostics;
-using System.Text;
-
using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Management.Automation.Host;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs
index b43f275aa5..2994c50f61 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs
@@ -3,11 +3,8 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.Collections.ObjectModel;
using System.Xml;
using System.Globalization;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Complex.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Complex.cs
index 715e902194..51bf9ee819 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Complex.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Complex.cs
@@ -3,12 +3,8 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
using System.Xml;
-using System.Globalization;
using System.Management.Automation.Internal;
namespace Microsoft.PowerShell.Commands.Internal.Format
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_List.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_List.cs
index 1081545531..fdd873d681 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_List.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_List.cs
@@ -2,11 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
using System.Xml;
using System.Management.Automation.Internal;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs
index a71efe65e2..1eec28946f 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs
@@ -3,12 +3,8 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
using System.Xml;
-using System.Globalization;
using System.Management.Automation.Internal;
namespace Microsoft.PowerShell.Commands.Internal.Format
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Views.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Views.cs
index 95199b2d9e..b1f5cf475c 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Views.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Views.cs
@@ -2,11 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
using System.Management.Automation;
using System.Xml;
using System.Globalization;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Wide.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Wide.cs
index 68cb64f126..7ee26d98dc 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Wide.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Wide.cs
@@ -2,10 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.Specialized;
using System.Xml;
using System.Management.Automation.Internal;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator.cs
index 0b845f6afe..c6eff9330a 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator.cs
@@ -3,13 +3,10 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Management.Automation;
using System.Management.Automation.Internal;
-using System.Globalization;
namespace Microsoft.PowerShell.Commands.Internal.Format
{
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Complex.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Complex.cs
index 788c09c0be..d66f55970a 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Complex.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Complex.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_List.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_List.cs
index 07fc6f7312..57639ee8a2 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_List.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_List.cs
@@ -2,8 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Management.Automation;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Table.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Table.cs
index 019c73a962..c94a02a8f2 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Table.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Table.cs
@@ -3,7 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Management.Automation;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Wide.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Wide.cs
index 0c77afb995..d99159e4bc 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Wide.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormatViewGenerator_Wide.cs
@@ -2,8 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Management.Automation;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormattingObjects.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormattingObjects.cs
index d86a4f96c9..bbfd93b019 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormattingObjects.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/FormattingObjects.cs
@@ -22,12 +22,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
// preserve the information.
//
-using System;
-using System.Globalization;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.Management.Automation;
namespace Microsoft.PowerShell.Commands.Internal.Format
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/ListWriter.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/ListWriter.cs
index e8d470b7e7..c8e99f4889 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/ListWriter.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/ListWriter.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Specialized;
using System.Diagnostics;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/OutputManager.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/OutputManager.cs
index 5eec3ca0e2..d2e6d70534 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/OutputManager.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/OutputManager.cs
@@ -3,7 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Management.Automation;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/OutputQueue.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/OutputQueue.cs
index d3a0d444b9..a2be8c9a92 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/OutputQueue.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/OutputQueue.cs
@@ -4,9 +4,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Diagnostics;
-using System.Collections;
using System.Collections.Generic;
-using System.Management.Automation;
namespace Microsoft.PowerShell.Commands.Internal.Format
{
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/TableWriter.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/TableWriter.cs
index 28d2dd1bd7..a46c7d21b8 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/TableWriter.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/TableWriter.cs
@@ -2,11 +2,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.Specialized;
using System.Text;
-using System.Management.Automation.Internal;
namespace Microsoft.PowerShell.Commands.Internal.Format
{
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/Utilities/MshParameterAssociation.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/Utilities/MshParameterAssociation.cs
index 6e308fe566..21152af431 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/Utilities/MshParameterAssociation.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/Utilities/MshParameterAssociation.cs
@@ -4,7 +4,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Management.Automation;
-using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/Utilities/Mshexpression.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/Utilities/Mshexpression.cs
index 815db46c84..16b84a9ee7 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/common/Utilities/Mshexpression.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/common/Utilities/Mshexpression.cs
@@ -4,7 +4,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Management.Automation;
-using Microsoft.PowerShell.Commands;
using System.Management.Automation.Internal;
using System.Collections;
using System.Collections.Generic;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/format-default/format-default.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/format-default/format-default.cs
index 5d75d4dde0..fb29206448 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/format-default/format-default.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/format-default/format-default.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation;
using Microsoft.PowerShell.Commands.Internal.Format;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/out-console/ConsoleLineOutput.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/out-console/ConsoleLineOutput.cs
index 04797cc2e0..25072abde9 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/out-console/ConsoleLineOutput.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/out-console/ConsoleLineOutput.cs
@@ -6,12 +6,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
// characters
//#define TEST_MULTICELL_ON_SINGLE_CELL_LOCALE
-using System;
-using System.Collections;
using System.Collections.Specialized;
-using System.IO;
-using System.Text;
-
using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Management.Automation.Host;
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/out-console/OutConsole.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/out-console/OutConsole.cs
index 1af735639a..a27a9a3795 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/out-console/OutConsole.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/out-console/OutConsole.cs
@@ -6,17 +6,10 @@ namespace Microsoft.PowerShell.Commands
{
using System;
using System.Collections;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Reflection;
using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Internal;
using Microsoft.PowerShell.Commands.Internal.Format;
- using System.IO;
- using System.Diagnostics;
- using System.Globalization;
- using Microsoft.Win32;
///
///
diff --git a/src/System.Management.Automation/commands/utility/FormatAndOutput/out-textInterface/OutTextInterface.cs b/src/System.Management.Automation/commands/utility/FormatAndOutput/out-textInterface/OutTextInterface.cs
index b84c557682..107c64e534 100644
--- a/src/System.Management.Automation/commands/utility/FormatAndOutput/out-textInterface/OutTextInterface.cs
+++ b/src/System.Management.Automation/commands/utility/FormatAndOutput/out-textInterface/OutTextInterface.cs
@@ -3,8 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
-using System.Reflection;
using System.Management.Automation;
using System.Management.Automation.Internal;
diff --git a/src/System.Management.Automation/engine/AliasInfo.cs b/src/System.Management.Automation/engine/AliasInfo.cs
index 15b1a465e6..da89a49a1b 100644
--- a/src/System.Management.Automation/engine/AliasInfo.cs
+++ b/src/System.Management.Automation/engine/AliasInfo.cs
@@ -2,11 +2,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.Linq;
-using System.Management.Automation.Internal;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/ApplicationInfo.cs b/src/System.Management.Automation/engine/ApplicationInfo.cs
index 044dcaef9c..1aa795492d 100644
--- a/src/System.Management.Automation/engine/ApplicationInfo.cs
+++ b/src/System.Management.Automation/engine/ApplicationInfo.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Diagnostics;
using System.Collections.ObjectModel;
using System.Collections.Generic;
diff --git a/src/System.Management.Automation/engine/ArgumentTypeConverterAttribute.cs b/src/System.Management.Automation/engine/ArgumentTypeConverterAttribute.cs
index 1716c8dd9e..4601f48ff6 100644
--- a/src/System.Management.Automation/engine/ArgumentTypeConverterAttribute.cs
+++ b/src/System.Management.Automation/engine/ArgumentTypeConverterAttribute.cs
@@ -2,8 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/System.Management.Automation/engine/Attributes.cs b/src/System.Management.Automation/engine/Attributes.cs
index 8cb3aa7b6f..771da8e352 100644
--- a/src/System.Management.Automation/engine/Attributes.cs
+++ b/src/System.Management.Automation/engine/Attributes.cs
@@ -2,17 +2,9 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Text;
using System.Text.RegularExpressions;
-using System.IO;
-using System.Resources;
-using System.Threading;
-using System.Reflection;
-using System.Runtime.Serialization;
using System.Globalization;
using System.Management.Automation.Internal;
using System.Diagnostics.CodeAnalysis;
diff --git a/src/System.Management.Automation/engine/AutomationEngine.cs b/src/System.Management.Automation/engine/AutomationEngine.cs
index 192d14a66d..cc0142663d 100644
--- a/src/System.Management.Automation/engine/AutomationEngine.cs
+++ b/src/System.Management.Automation/engine/AutomationEngine.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Linq;
using System.Management.Automation.Host;
using System.Management.Automation.Language;
diff --git a/src/System.Management.Automation/engine/AutomationNull.cs b/src/System.Management.Automation/engine/AutomationNull.cs
index 7da16f530b..c45f0b1a3a 100644
--- a/src/System.Management.Automation/engine/AutomationNull.cs
+++ b/src/System.Management.Automation/engine/AutomationNull.cs
@@ -2,9 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Management.Automation;
-
namespace System.Management.Automation.Internal
{
///
diff --git a/src/System.Management.Automation/engine/COM/ComAdapter.cs b/src/System.Management.Automation/engine/COM/ComAdapter.cs
index ecec00ea4f..f2eebbe32f 100644
--- a/src/System.Management.Automation/engine/COM/ComAdapter.cs
+++ b/src/System.Management.Automation/engine/COM/ComAdapter.cs
@@ -6,9 +6,12 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.ComponentModel;
-using System.Reflection;
using Microsoft.PowerShell;
+#if CORECLR
+using System.Reflection;
+#endif
+
namespace System.Management.Automation
{
///
diff --git a/src/System.Management.Automation/engine/ChildrenCmdletProviderInterfaces.cs b/src/System.Management.Automation/engine/ChildrenCmdletProviderInterfaces.cs
index c743b68a9f..fcff19c21c 100644
--- a/src/System.Management.Automation/engine/ChildrenCmdletProviderInterfaces.cs
+++ b/src/System.Management.Automation/engine/ChildrenCmdletProviderInterfaces.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/CmdletFamilyProviderInterfaces.cs b/src/System.Management.Automation/engine/CmdletFamilyProviderInterfaces.cs
index 5f507bd04d..b65fde53ef 100644
--- a/src/System.Management.Automation/engine/CmdletFamilyProviderInterfaces.cs
+++ b/src/System.Management.Automation/engine/CmdletFamilyProviderInterfaces.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using Dbg = System.Management.Automation;
using System.Management.Automation.Internal;
diff --git a/src/System.Management.Automation/engine/CmdletInfo.cs b/src/System.Management.Automation/engine/CmdletInfo.cs
index 44c21c1803..0108f9ec3d 100644
--- a/src/System.Management.Automation/engine/CmdletInfo.cs
+++ b/src/System.Management.Automation/engine/CmdletInfo.cs
@@ -2,15 +2,10 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
-using System.Management.Automation;
-using System.Management.Automation.Runspaces;
-using System.Management.Automation.Internal;
using System.Reflection;
using System.Text;
-using System.Threading;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/CodeMethods.cs b/src/System.Management.Automation/engine/CodeMethods.cs
index c1cd88a7d1..bdc6ecb4fc 100644
--- a/src/System.Management.Automation/engine/CodeMethods.cs
+++ b/src/System.Management.Automation/engine/CodeMethods.cs
@@ -6,7 +6,6 @@ using System;
using System.Collections;
using System.Reflection;
using System.Globalization;
-using System.Xml;
using System.Management.Automation;
using System.Diagnostics.CodeAnalysis;
using System.DirectoryServices;
diff --git a/src/System.Management.Automation/engine/ComInterop/BoolArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/BoolArgBuilder.cs
index 476ff9cd8d..3884e5142d 100644
--- a/src/System.Management.Automation/engine/ComInterop/BoolArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/BoolArgBuilder.cs
@@ -8,13 +8,7 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System.Collections.Generic;
-
-using System;
using System.Diagnostics;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
namespace System.Management.Automation.ComInterop
{
diff --git a/src/System.Management.Automation/engine/ComInterop/BoundDispEvent.cs b/src/System.Management.Automation/engine/ComInterop/BoundDispEvent.cs
index 1ff0a095a8..63152c42e7 100644
--- a/src/System.Management.Automation/engine/ComInterop/BoundDispEvent.cs
+++ b/src/System.Management.Automation/engine/ComInterop/BoundDispEvent.cs
@@ -8,12 +8,8 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Dynamic;
-using System.Runtime.CompilerServices;
-using System.Security;
-using System.Security.Permissions;
+
//using Microsoft.Scripting.Utils;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/CollectionExtensions.cs b/src/System.Management.Automation/engine/ComInterop/CollectionExtensions.cs
index 883ca5ee32..b3c7d7e0f0 100644
--- a/src/System.Management.Automation/engine/ComInterop/CollectionExtensions.cs
+++ b/src/System.Management.Automation/engine/ComInterop/CollectionExtensions.cs
@@ -3,9 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Diagnostics;
-using System;
namespace System.Management.Automation.ComInterop
{
diff --git a/src/System.Management.Automation/engine/ComInterop/ComBinder.cs b/src/System.Management.Automation/engine/ComInterop/ComBinder.cs
index 2644e5c6c7..f386967919 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComBinder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComBinder.cs
@@ -8,12 +8,8 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
-using System.Security;
-using System.Security.Permissions;
using System.Management.Automation.Language;
//using Microsoft.Scripting.Utils;
using System.Dynamic;
diff --git a/src/System.Management.Automation/engine/ComInterop/ComBinderHelpers.cs b/src/System.Management.Automation/engine/ComInterop/ComBinderHelpers.cs
index 22a635f9f5..b59fb4acd3 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComBinderHelpers.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComBinderHelpers.cs
@@ -8,16 +8,11 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Diagnostics;
using System.Dynamic;
-using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Globalization;
-using System.Management.Automation;
using System.Management.Automation.Language;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/ComClassMetaObject.cs b/src/System.Management.Automation/engine/ComInterop/ComClassMetaObject.cs
index 9eb545bcc1..32029435f4 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComClassMetaObject.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComClassMetaObject.cs
@@ -12,7 +12,6 @@ using Microsoft.Scripting.Ast;
using System.Dynamic;
//using AstUtils = Microsoft.Scripting.Ast.Utils;
-using System.Management.Automation.Interpreter;
using AstUtils = System.Management.Automation.Interpreter.Utils;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/ComEventDesc.cs b/src/System.Management.Automation/engine/ComInterop/ComEventDesc.cs
index f35661aa5d..3c77c81bba 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComEventDesc.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComEventDesc.cs
@@ -4,8 +4,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
-
namespace System.Management.Automation.ComInterop
{
internal class ComEventDesc
diff --git a/src/System.Management.Automation/engine/ComInterop/ComEventSink.cs b/src/System.Management.Automation/engine/ComInterop/ComEventSink.cs
index e3ba55ee95..5a873a5814 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComEventSink.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComEventSink.cs
@@ -4,13 +4,11 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Runtime.InteropServices;
-using System.Security;
using ComTypes = System.Runtime.InteropServices.ComTypes;
//using Microsoft.Scripting.Utils;
diff --git a/src/System.Management.Automation/engine/ComInterop/ComEventSinkProxy.cs b/src/System.Management.Automation/engine/ComInterop/ComEventSinkProxy.cs
index 80760543f9..d2c2abb53b 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComEventSinkProxy.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComEventSinkProxy.cs
@@ -4,15 +4,13 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
using System.Globalization;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Remoting.Proxies;
-using System.Security;
-using System.Security.Permissions;
+
//using Microsoft.Scripting.Utils;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/ComEventSinksContainer.cs b/src/System.Management.Automation/engine/ComInterop/ComEventSinksContainer.cs
index 44bf9ae1de..3f3f5518bf 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComEventSinksContainer.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComEventSinksContainer.cs
@@ -4,10 +4,8 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
-using System.Security;
namespace System.Management.Automation.ComInterop
{
diff --git a/src/System.Management.Automation/engine/ComInterop/ComFallbackMetaObject.cs b/src/System.Management.Automation/engine/ComInterop/ComFallbackMetaObject.cs
index 4bdc0acd06..44fec0fdc4 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComFallbackMetaObject.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComFallbackMetaObject.cs
@@ -11,7 +11,6 @@ using Microsoft.Scripting.Ast;
#endif
using System.Dynamic;
-using System.Diagnostics;
//using Microsoft.Scripting.Utils;
diff --git a/src/System.Management.Automation/engine/ComInterop/ComInterop.cs b/src/System.Management.Automation/engine/ComInterop/ComInterop.cs
index 452cba824e..aa55125815 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComInterop.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComInterop.cs
@@ -4,7 +4,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
using System.Runtime.InteropServices;
using ComTypes = System.Runtime.InteropServices.ComTypes;
diff --git a/src/System.Management.Automation/engine/ComInterop/ComInvokeAction.cs b/src/System.Management.Automation/engine/ComInterop/ComInvokeAction.cs
index b55d933242..02288ec8b7 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComInvokeAction.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComInvokeAction.cs
@@ -9,14 +9,10 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Dynamic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Runtime.CompilerServices;
-using System.Management.Automation;
-using System.Management.Automation.Language;
namespace System.Management.Automation.ComInterop
{
diff --git a/src/System.Management.Automation/engine/ComInterop/ComInvokeBinder.cs b/src/System.Management.Automation/engine/ComInterop/ComInvokeBinder.cs
index e42ea3b7e1..1f97d2e1bc 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComInvokeBinder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComInvokeBinder.cs
@@ -8,15 +8,11 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Dynamic;
using ComTypes = System.Runtime.InteropServices.ComTypes;
-using System.Linq;
-using System.Management.Automation.Language;
namespace System.Management.Automation.ComInterop
{
diff --git a/src/System.Management.Automation/engine/ComInterop/ComMetaObject.cs b/src/System.Management.Automation/engine/ComInterop/ComMetaObject.cs
index d2fbc32731..79c7a55bbd 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComMetaObject.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComMetaObject.cs
@@ -8,10 +8,7 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Dynamic;
-using System.Collections.Generic;
//using Microsoft.Scripting.Utils;
diff --git a/src/System.Management.Automation/engine/ComInterop/ComMethodDesc.cs b/src/System.Management.Automation/engine/ComInterop/ComMethodDesc.cs
index e297a72e57..259f9025da 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComMethodDesc.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComMethodDesc.cs
@@ -4,13 +4,8 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
using System.Diagnostics;
using System.Runtime.InteropServices.ComTypes;
-using System.Text;
-using System.Globalization;
-using Marshal = System.Runtime.InteropServices.Marshal;
-using VarEnum = System.Runtime.InteropServices.VarEnum;
namespace System.Management.Automation.ComInterop
{
diff --git a/src/System.Management.Automation/engine/ComInterop/ComObject.cs b/src/System.Management.Automation/engine/ComInterop/ComObject.cs
index 6b77da7033..18dfc33227 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComObject.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComObject.cs
@@ -8,14 +8,10 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
-using System.Security;
-using System.Security.Permissions;
using System.Dynamic;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/ComParamDesc.cs b/src/System.Management.Automation/engine/ComInterop/ComParamDesc.cs
index 799de11e19..afd56740c7 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComParamDesc.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComParamDesc.cs
@@ -4,7 +4,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
using Marshal = System.Runtime.InteropServices.Marshal;
diff --git a/src/System.Management.Automation/engine/ComInterop/ComRuntimeHelpers.cs b/src/System.Management.Automation/engine/ComInterop/ComRuntimeHelpers.cs
index 3269d6875a..0673afc281 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComRuntimeHelpers.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComRuntimeHelpers.cs
@@ -4,7 +4,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
diff --git a/src/System.Management.Automation/engine/ComInterop/ComTypeClassDesc.cs b/src/System.Management.Automation/engine/ComInterop/ComTypeClassDesc.cs
index fc4a5daf67..36c8c01323 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComTypeClassDesc.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComTypeClassDesc.cs
@@ -8,8 +8,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections.Generic;
using System.Dynamic;
using ComTypes = System.Runtime.InteropServices.ComTypes;
diff --git a/src/System.Management.Automation/engine/ComInterop/ComTypeDesc.cs b/src/System.Management.Automation/engine/ComInterop/ComTypeDesc.cs
index 7e1abfa0bd..a3248abc68 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComTypeDesc.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComTypeDesc.cs
@@ -4,7 +4,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices.ComTypes;
diff --git a/src/System.Management.Automation/engine/ComInterop/ComTypeEnumDesc.cs b/src/System.Management.Automation/engine/ComInterop/ComTypeEnumDesc.cs
index e3e1b88c1c..79a518ef13 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComTypeEnumDesc.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComTypeEnumDesc.cs
@@ -9,8 +9,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Runtime.InteropServices;
using System.Dynamic;
using System.Globalization;
diff --git a/src/System.Management.Automation/engine/ComInterop/ComTypeLibDesc.cs b/src/System.Management.Automation/engine/ComInterop/ComTypeLibDesc.cs
index 36881a615c..c11adda0ca 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComTypeLibDesc.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComTypeLibDesc.cs
@@ -8,8 +8,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Dynamic;
diff --git a/src/System.Management.Automation/engine/ComInterop/ComTypeLibInfo.cs b/src/System.Management.Automation/engine/ComInterop/ComTypeLibInfo.cs
index 7018912f2e..f95c4c06d0 100644
--- a/src/System.Management.Automation/engine/ComInterop/ComTypeLibInfo.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ComTypeLibInfo.cs
@@ -9,8 +9,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Dynamic;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/ConversionArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/ConversionArgBuilder.cs
index 730558533b..1ac97d3dfb 100644
--- a/src/System.Management.Automation/engine/ComInterop/ConversionArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ConversionArgBuilder.cs
@@ -8,10 +8,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
-using System.Diagnostics;
-using System.Runtime.CompilerServices;
//using Microsoft.Scripting.Utils;
using System.Management.Automation.Interpreter;
diff --git a/src/System.Management.Automation/engine/ComInterop/ConvertArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/ConvertArgBuilder.cs
index 6dc2f792a1..ba80b0abcc 100644
--- a/src/System.Management.Automation/engine/ComInterop/ConvertArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ConvertArgBuilder.cs
@@ -10,8 +10,6 @@ using System.Linq.Expressions;
using Microsoft.Scripting.Ast;
#endif
-using System;
-
namespace System.Management.Automation.ComInterop
{
internal class ConvertArgBuilder : SimpleArgBuilder
diff --git a/src/System.Management.Automation/engine/ComInterop/ConvertibleArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/ConvertibleArgBuilder.cs
index 18526c863a..5a74242f94 100644
--- a/src/System.Management.Automation/engine/ComInterop/ConvertibleArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ConvertibleArgBuilder.cs
@@ -9,9 +9,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
-using System.Globalization;
//using Microsoft.Scripting.Utils;
using System.Management.Automation.Interpreter;
diff --git a/src/System.Management.Automation/engine/ComInterop/CurrencyArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/CurrencyArgBuilder.cs
index ad09f14f0f..7706046fb2 100644
--- a/src/System.Management.Automation/engine/ComInterop/CurrencyArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/CurrencyArgBuilder.cs
@@ -8,8 +8,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
diff --git a/src/System.Management.Automation/engine/ComInterop/DateTimeArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/DateTimeArgBuilder.cs
index b85d9658cc..d9b6ba4638 100644
--- a/src/System.Management.Automation/engine/ComInterop/DateTimeArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/DateTimeArgBuilder.cs
@@ -8,12 +8,7 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
-using System.Collections.Generic;
using System.Diagnostics;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
namespace System.Management.Automation.ComInterop
{
diff --git a/src/System.Management.Automation/engine/ComInterop/DispCallable.cs b/src/System.Management.Automation/engine/ComInterop/DispCallable.cs
index ff5f7420a5..a68cf68459 100644
--- a/src/System.Management.Automation/engine/ComInterop/DispCallable.cs
+++ b/src/System.Management.Automation/engine/ComInterop/DispCallable.cs
@@ -8,8 +8,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Dynamic;
using System.Globalization;
diff --git a/src/System.Management.Automation/engine/ComInterop/DispCallableMetaObject.cs b/src/System.Management.Automation/engine/ComInterop/DispCallableMetaObject.cs
index 85cbfbf778..9942a224c7 100644
--- a/src/System.Management.Automation/engine/ComInterop/DispCallableMetaObject.cs
+++ b/src/System.Management.Automation/engine/ComInterop/DispCallableMetaObject.cs
@@ -9,12 +9,8 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Linq;
using System.Dynamic;
-using System.Security;
-using System.Security.Permissions;
using System.Collections.Generic;
using System.Management.Automation.Language;
diff --git a/src/System.Management.Automation/engine/ComInterop/DispatchArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/DispatchArgBuilder.cs
index dcedeb6a37..69e304def0 100644
--- a/src/System.Management.Automation/engine/ComInterop/DispatchArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/DispatchArgBuilder.cs
@@ -8,11 +8,7 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
-using System.Collections.Generic;
using System.Runtime.InteropServices;
-using System.Diagnostics;
namespace System.Management.Automation.ComInterop
{
diff --git a/src/System.Management.Automation/engine/ComInterop/ErrorArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/ErrorArgBuilder.cs
index 38aa68fc22..d50c1f624c 100644
--- a/src/System.Management.Automation/engine/ComInterop/ErrorArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ErrorArgBuilder.cs
@@ -9,9 +9,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
-using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Diagnostics;
diff --git a/src/System.Management.Automation/engine/ComInterop/Errors.cs b/src/System.Management.Automation/engine/ComInterop/Errors.cs
index 43a980187f..6e774e384c 100644
--- a/src/System.Management.Automation/engine/ComInterop/Errors.cs
+++ b/src/System.Management.Automation/engine/ComInterop/Errors.cs
@@ -2,10 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Management.Automation;
-using System.Management.Automation.Language;
-
namespace System.Management.Automation.ComInterop
{
#region Generated Com Exception Factory
diff --git a/src/System.Management.Automation/engine/ComInterop/ExcepInfo.cs b/src/System.Management.Automation/engine/ComInterop/ExcepInfo.cs
index fea45856c1..e529935a3b 100644
--- a/src/System.Management.Automation/engine/ComInterop/ExcepInfo.cs
+++ b/src/System.Management.Automation/engine/ComInterop/ExcepInfo.cs
@@ -4,11 +4,9 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
-using System.Security;
using ComTypes = System.Runtime.InteropServices.ComTypes;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/Helpers.cs b/src/System.Management.Automation/engine/ComInterop/Helpers.cs
index db548da6db..36467c914f 100644
--- a/src/System.Management.Automation/engine/ComInterop/Helpers.cs
+++ b/src/System.Management.Automation/engine/ComInterop/Helpers.cs
@@ -8,8 +8,6 @@ using System.Linq.Expressions;
using Microsoft.Scripting.Ast;
#endif
-using System;
-
namespace System.Management.Automation.ComInterop
{
// Miscellaneous helpers that don't belong anywhere else
diff --git a/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs b/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs
index 89ef7daf3b..23c9bd242b 100644
--- a/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs
+++ b/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs
@@ -8,16 +8,12 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Runtime.InteropServices;
-using System.Security;
-using System.Security.Permissions;
using ComTypes = System.Runtime.InteropServices.ComTypes;
using System.Dynamic;
diff --git a/src/System.Management.Automation/engine/ComInterop/IDispatchMetaObject.cs b/src/System.Management.Automation/engine/ComInterop/IDispatchMetaObject.cs
index ade08a232e..59b3259bb8 100644
--- a/src/System.Management.Automation/engine/ComInterop/IDispatchMetaObject.cs
+++ b/src/System.Management.Automation/engine/ComInterop/IDispatchMetaObject.cs
@@ -8,11 +8,8 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Linq;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Dynamic;
using System.Runtime.InteropServices.ComTypes;
using System.Management.Automation.Language;
diff --git a/src/System.Management.Automation/engine/ComInterop/IPseudoComObject.cs b/src/System.Management.Automation/engine/ComInterop/IPseudoComObject.cs
index 4a7c4cdf8d..9fdfb252bb 100644
--- a/src/System.Management.Automation/engine/ComInterop/IPseudoComObject.cs
+++ b/src/System.Management.Automation/engine/ComInterop/IPseudoComObject.cs
@@ -7,8 +7,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Dynamic;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/NullArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/NullArgBuilder.cs
index a4891ff241..b4598a32d1 100644
--- a/src/System.Management.Automation/engine/ComInterop/NullArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/NullArgBuilder.cs
@@ -9,9 +9,6 @@ using System.Linq.Expressions;
using Microsoft.Scripting.Ast;
#endif
-using System;
-using System.Diagnostics;
-
namespace System.Management.Automation.ComInterop
{
///
diff --git a/src/System.Management.Automation/engine/ComInterop/SimpleArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/SimpleArgBuilder.cs
index 7cddf3a846..33536c72c6 100644
--- a/src/System.Management.Automation/engine/ComInterop/SimpleArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/SimpleArgBuilder.cs
@@ -8,8 +8,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Diagnostics;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/SplatCallSite.cs b/src/System.Management.Automation/engine/ComInterop/SplatCallSite.cs
index 3a62eb7b53..8490828489 100644
--- a/src/System.Management.Automation/engine/ComInterop/SplatCallSite.cs
+++ b/src/System.Management.Automation/engine/ComInterop/SplatCallSite.cs
@@ -3,12 +3,9 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
#if !CLR2
-using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
//using Microsoft.Scripting.Utils;
diff --git a/src/System.Management.Automation/engine/ComInterop/StringArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/StringArgBuilder.cs
index 41d7a73539..5fd8486016 100644
--- a/src/System.Management.Automation/engine/ComInterop/StringArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/StringArgBuilder.cs
@@ -8,9 +8,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
-using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Diagnostics;
diff --git a/src/System.Management.Automation/engine/ComInterop/TypeEnumMetaObject.cs b/src/System.Management.Automation/engine/ComInterop/TypeEnumMetaObject.cs
index d5bf3f5101..cc22f40b30 100644
--- a/src/System.Management.Automation/engine/ComInterop/TypeEnumMetaObject.cs
+++ b/src/System.Management.Automation/engine/ComInterop/TypeEnumMetaObject.cs
@@ -8,8 +8,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections.Generic;
using System.Dynamic;
//using Microsoft.Scripting.Runtime;
diff --git a/src/System.Management.Automation/engine/ComInterop/TypeUtils.cs b/src/System.Management.Automation/engine/ComInterop/TypeUtils.cs
index a86bfe33da..0401e241b0 100644
--- a/src/System.Management.Automation/engine/ComInterop/TypeUtils.cs
+++ b/src/System.Management.Automation/engine/ComInterop/TypeUtils.cs
@@ -3,14 +3,9 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
#if !CLR2
-using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
using System.Reflection;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/UnknownArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/UnknownArgBuilder.cs
index 93cd81858a..a603e93283 100644
--- a/src/System.Management.Automation/engine/ComInterop/UnknownArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/UnknownArgBuilder.cs
@@ -9,11 +9,7 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
-using System.Collections.Generic;
using System.Runtime.InteropServices;
-using System.Diagnostics;
namespace System.Management.Automation.ComInterop
{
diff --git a/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs b/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs
index a9f7046a37..9f03dbb6eb 100644
--- a/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs
+++ b/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs
@@ -4,12 +4,10 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
-using System.Management.Automation.ComInterop;
namespace System.Management.Automation.ComInterop
{
diff --git a/src/System.Management.Automation/engine/ComInterop/Variant.cs b/src/System.Management.Automation/engine/ComInterop/Variant.cs
index 7f20f090ea..2062d8f264 100644
--- a/src/System.Management.Automation/engine/ComInterop/Variant.cs
+++ b/src/System.Management.Automation/engine/ComInterop/Variant.cs
@@ -4,17 +4,12 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#if !SILVERLIGHT // ComObject
-using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.InteropServices;
-using System.Security;
-using System.Security.Permissions;
//using Microsoft.Scripting.Utils;
-using System.Reflection;
//using Microsoft.Scripting.Generation;
-using System.Reflection.Emit;
using Assert = System.Management.Automation.Interpreter.Assert;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/VariantArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/VariantArgBuilder.cs
index e7a7896859..f8aaccc42e 100644
--- a/src/System.Management.Automation/engine/ComInterop/VariantArgBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/VariantArgBuilder.cs
@@ -8,11 +8,7 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
-using System.Collections.Generic;
using System.Runtime.InteropServices;
-using System.Diagnostics;
using System.Reflection;
namespace System.Management.Automation.ComInterop
diff --git a/src/System.Management.Automation/engine/ComInterop/VariantArray.cs b/src/System.Management.Automation/engine/ComInterop/VariantArray.cs
index 6b4ff5e204..4bf2b6b874 100644
--- a/src/System.Management.Automation/engine/ComInterop/VariantArray.cs
+++ b/src/System.Management.Automation/engine/ComInterop/VariantArray.cs
@@ -8,8 +8,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
diff --git a/src/System.Management.Automation/engine/ComInterop/VariantBuilder.cs b/src/System.Management.Automation/engine/ComInterop/VariantBuilder.cs
index b3828ca89c..4aad6d82cb 100644
--- a/src/System.Management.Automation/engine/ComInterop/VariantBuilder.cs
+++ b/src/System.Management.Automation/engine/ComInterop/VariantBuilder.cs
@@ -9,8 +9,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
diff --git a/src/System.Management.Automation/engine/CommandBase.cs b/src/System.Management.Automation/engine/CommandBase.cs
index b8080df775..a6e450dc76 100644
--- a/src/System.Management.Automation/engine/CommandBase.cs
+++ b/src/System.Management.Automation/engine/CommandBase.cs
@@ -2,19 +2,11 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Management.Automation;
using System.Management.Automation.Language;
-using System.Reflection;
-using System.Text;
using System.Diagnostics;
-using System.Resources;
using System.Management.Automation.Host;
using System.Management.Automation.Internal.Host;
-using System.Threading;
using System.Management.Automation.Internal;
using Dbg = System.Management.Automation.Diagnostics;
using System.Management.Automation.Runspaces;
diff --git a/src/System.Management.Automation/engine/CommandCompletion/CompletionExecutionHelper.cs b/src/System.Management.Automation/engine/CommandCompletion/CompletionExecutionHelper.cs
index 2e688af22a..f8a01b82e3 100644
--- a/src/System.Management.Automation/engine/CommandCompletion/CompletionExecutionHelper.cs
+++ b/src/System.Management.Automation/engine/CommandCompletion/CompletionExecutionHelper.cs
@@ -9,7 +9,6 @@ namespace System.Management.Automation
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Management.Automation.Runspaces;
- using System.Management.Automation.Remoting;
using System.Collections;
///
diff --git a/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs b/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs
index 0cf0892c27..a6c098bee9 100644
--- a/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs
+++ b/src/System.Management.Automation/engine/CommandCompletion/CompletionResult.cs
@@ -9,8 +9,6 @@
namespace System.Management.Automation
{
using System;
- using Microsoft.PowerShell.Commands;
- using System.Management.Automation;
///
/// Possible types of CompletionResults
diff --git a/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs b/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs
index 56219ba0f0..ca201d716d 100644
--- a/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs
+++ b/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs
@@ -6,10 +6,13 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
-using System.Reflection;
using System.Linq;
using System.Management.Automation.Language;
+#if CORECLR
+using System.Reflection;
+#endif
+
namespace System.Management.Automation
{
///
diff --git a/src/System.Management.Automation/engine/CommandFactory.cs b/src/System.Management.Automation/engine/CommandFactory.cs
index b3f4f06849..7481d2f60a 100644
--- a/src/System.Management.Automation/engine/CommandFactory.cs
+++ b/src/System.Management.Automation/engine/CommandFactory.cs
@@ -2,10 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Text.RegularExpressions;
-using System.Management.Automation;
-
namespace System.Management.Automation
{
///
diff --git a/src/System.Management.Automation/engine/CommandInfo.cs b/src/System.Management.Automation/engine/CommandInfo.cs
index f76a7a6824..28e5474682 100644
--- a/src/System.Management.Automation/engine/CommandInfo.cs
+++ b/src/System.Management.Automation/engine/CommandInfo.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
diff --git a/src/System.Management.Automation/engine/CommandParameter.cs b/src/System.Management.Automation/engine/CommandParameter.cs
index 90d311ca20..dc7d242246 100644
--- a/src/System.Management.Automation/engine/CommandParameter.cs
+++ b/src/System.Management.Automation/engine/CommandParameter.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Diagnostics;
using System.Management.Automation.Language;
diff --git a/src/System.Management.Automation/engine/CommandProcessor.cs b/src/System.Management.Automation/engine/CommandProcessor.cs
index 896459accb..abb3516813 100644
--- a/src/System.Management.Automation/engine/CommandProcessor.cs
+++ b/src/System.Management.Automation/engine/CommandProcessor.cs
@@ -2,19 +2,19 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Concurrent;
-using System.Collections.Generic;
using System.Linq.Expressions;
-using System.Reflection;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Management.Automation.Internal;
-using System.Management.Automation.Language;
using Microsoft.PowerShell.Commands;
using Dbg = System.Management.Automation.Diagnostics;
+#if CORECLR
+using System.Reflection;
+#endif
+
namespace System.Management.Automation
{
///
@@ -23,7 +23,7 @@ namespace System.Management.Automation
///
internal class CommandProcessor : CommandProcessorBase
{
- #region ctor
+#region ctor
static CommandProcessor()
{
@@ -92,9 +92,9 @@ namespace System.Management.Automation
// CommandProcessor
- #endregion ctor
+#endregion ctor
- #region internal members
+#region internal members
///
/// Returns a CmdletParameterBinderController for the specified command
///
@@ -380,9 +380,9 @@ namespace System.Management.Automation
}
}
- #endregion public_methods
+#endregion public_methods
- #region helper_methods
+#region helper_methods
///
/// Tells whether it is the first call to Read
@@ -837,7 +837,7 @@ namespace System.Management.Automation
return base.IsHelpRequested(out helpTarget, out helpCategory);
}
- #endregion helper_methods
+#endregion helper_methods
}
}
diff --git a/src/System.Management.Automation/engine/CommandProcessorBase.cs b/src/System.Management.Automation/engine/CommandProcessorBase.cs
index 3f2fc766f6..9365bcd589 100644
--- a/src/System.Management.Automation/engine/CommandProcessorBase.cs
+++ b/src/System.Management.Automation/engine/CommandProcessorBase.cs
@@ -2,12 +2,9 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Management.Automation.Language;
-using System.Text;
using System.Collections.ObjectModel;
-using System.Management.Automation;
using System.Management.Automation.Internal;
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/System.Management.Automation/engine/CommonCommandParameters.cs b/src/System.Management.Automation/engine/CommonCommandParameters.cs
index a841c11c19..8119ae4fc8 100644
--- a/src/System.Management.Automation/engine/CommonCommandParameters.cs
+++ b/src/System.Management.Automation/engine/CommonCommandParameters.cs
@@ -2,9 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
-using System.Management.Automation;
using System.Management.Automation.Remoting;
using System.Management.Automation.Runspaces;
diff --git a/src/System.Management.Automation/engine/CompiledCommandParameter.cs b/src/System.Management.Automation/engine/CompiledCommandParameter.cs
index 1f5f0e416b..7fd48e6fc2 100644
--- a/src/System.Management.Automation/engine/CompiledCommandParameter.cs
+++ b/src/System.Management.Automation/engine/CompiledCommandParameter.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
diff --git a/src/System.Management.Automation/engine/ConfigurationInfo.cs b/src/System.Management.Automation/engine/ConfigurationInfo.cs
index 98c2ff7e73..49b83c923e 100644
--- a/src/System.Management.Automation/engine/ConfigurationInfo.cs
+++ b/src/System.Management.Automation/engine/ConfigurationInfo.cs
@@ -2,11 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Management.Automation;
-using System.Text;
-
-
namespace System.Management.Automation
{
///
diff --git a/src/System.Management.Automation/engine/ContentCmdletProviderInterfaces.cs b/src/System.Management.Automation/engine/ContentCmdletProviderInterfaces.cs
index e84462f0a3..a98c515dec 100644
--- a/src/System.Management.Automation/engine/ContentCmdletProviderInterfaces.cs
+++ b/src/System.Management.Automation/engine/ContentCmdletProviderInterfaces.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using System.Management.Automation.Provider;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/Credential.cs b/src/System.Management.Automation/engine/Credential.cs
index 5d60968c0f..93c3c9c46c 100644
--- a/src/System.Management.Automation/engine/Credential.cs
+++ b/src/System.Management.Automation/engine/Credential.cs
@@ -9,13 +9,13 @@ using System.Net;
using System.Security;
using SafeString = System.String;
using System.Runtime.Serialization;
-using System.Runtime.InteropServices;
using System.Security.Cryptography;
using Microsoft.PowerShell;
#if CORECLR
// Use stubs for ISerializable related types
using Microsoft.PowerShell.CoreClr.Stubs;
+using System.Runtime.InteropServices;
#endif
// FxCop suppressions for resource strings:
diff --git a/src/System.Management.Automation/engine/CultureVariable.cs b/src/System.Management.Automation/engine/CultureVariable.cs
index 7618380575..b9d6deca7a 100644
--- a/src/System.Management.Automation/engine/CultureVariable.cs
+++ b/src/System.Management.Automation/engine/CultureVariable.cs
@@ -2,9 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Management.Automation.Runspaces;
-
namespace System.Management.Automation
{
///
diff --git a/src/System.Management.Automation/engine/DataStoreAdapter.cs b/src/System.Management.Automation/engine/DataStoreAdapter.cs
index 6ad0a6c851..0a74f75b3d 100644
--- a/src/System.Management.Automation/engine/DataStoreAdapter.cs
+++ b/src/System.Management.Automation/engine/DataStoreAdapter.cs
@@ -4,8 +4,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#pragma warning disable 1634, 1691
-using System;
-using System.Runtime.InteropServices;
using System.Threading;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/DefaultCommandRuntime.cs b/src/System.Management.Automation/engine/DefaultCommandRuntime.cs
index fe0712250a..01b6fb8faf 100644
--- a/src/System.Management.Automation/engine/DefaultCommandRuntime.cs
+++ b/src/System.Management.Automation/engine/DefaultCommandRuntime.cs
@@ -4,10 +4,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Generic;
-using System.Management.Automation;
using System.Management.Automation.Host;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/DriveInterfaces.cs b/src/System.Management.Automation/engine/DriveInterfaces.cs
index 3fd0d3e3b6..7226a9657b 100644
--- a/src/System.Management.Automation/engine/DriveInterfaces.cs
+++ b/src/System.Management.Automation/engine/DriveInterfaces.cs
@@ -2,11 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Management.Automation;
using Dbg = System.Management.Automation;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/DriveNames.cs b/src/System.Management.Automation/engine/DriveNames.cs
index b25441387f..4ff78c68c1 100644
--- a/src/System.Management.Automation/engine/DriveNames.cs
+++ b/src/System.Management.Automation/engine/DriveNames.cs
@@ -2,8 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-
namespace System.Management.Automation
{
///
diff --git a/src/System.Management.Automation/engine/DscResourceInfo.cs b/src/System.Management.Automation/engine/DscResourceInfo.cs
index c0adcae8b3..d2c258efd9 100644
--- a/src/System.Management.Automation/engine/DscResourceInfo.cs
+++ b/src/System.Management.Automation/engine/DscResourceInfo.cs
@@ -4,9 +4,6 @@
//-----------------------------------------------------------------------
using System.Collections.Generic;
-using System;
-using System.Management.Automation;
-using System.IO;
using System.Collections.ObjectModel;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/DscResourceSearcher.cs b/src/System.Management.Automation/engine/DscResourceSearcher.cs
index 822cec98d4..2581676f65 100644
--- a/src/System.Management.Automation/engine/DscResourceSearcher.cs
+++ b/src/System.Management.Automation/engine/DscResourceSearcher.cs
@@ -5,8 +5,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.IO;
-using System.Management.Automation.Runspaces;
using Dbg = System.Management.Automation.Diagnostics;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/EngineIntrinsics.cs b/src/System.Management.Automation/engine/EngineIntrinsics.cs
index 9157896fe5..b3b296f9fe 100644
--- a/src/System.Management.Automation/engine/EngineIntrinsics.cs
+++ b/src/System.Management.Automation/engine/EngineIntrinsics.cs
@@ -2,8 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Management.Automation;
using System.Management.Automation.Host;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/EnumMinimumDisambiguation.cs b/src/System.Management.Automation/engine/EnumMinimumDisambiguation.cs
index 21a0c83147..f03cf4b027 100644
--- a/src/System.Management.Automation/engine/EnumMinimumDisambiguation.cs
+++ b/src/System.Management.Automation/engine/EnumMinimumDisambiguation.cs
@@ -2,16 +2,9 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.Text;
-using System.Reflection;
-using System.Resources;
-using System.Diagnostics;
using Dbg = System.Management.Automation;
-using System.Globalization;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/ExecutionContext.cs b/src/System.Management.Automation/engine/ExecutionContext.cs
index 0a0a2ffe3e..e77968eb73 100644
--- a/src/System.Management.Automation/engine/ExecutionContext.cs
+++ b/src/System.Management.Automation/engine/ExecutionContext.cs
@@ -16,7 +16,6 @@ using System.Reflection;
using System.Security;
using System.Diagnostics.CodeAnalysis;
using Microsoft.PowerShell.Commands.Internal.Format;
-using System.Threading.Tasks;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs b/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs
index 1873a53d3c..d9068e198d 100644
--- a/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs
+++ b/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Runtime.Serialization;
using System.Management.Automation.Internal;
diff --git a/src/System.Management.Automation/engine/ExternalScriptInfo.cs b/src/System.Management.Automation/engine/ExternalScriptInfo.cs
index 035b8bb44d..a4f1bf1106 100644
--- a/src/System.Management.Automation/engine/ExternalScriptInfo.cs
+++ b/src/System.Management.Automation/engine/ExternalScriptInfo.cs
@@ -6,7 +6,6 @@ using System.IO;
using System.Text;
using System.Collections.ObjectModel;
using System.Management.Automation.Runspaces;
-using System.Threading;
using Microsoft.PowerShell.Commands;
using System.Collections.Generic;
using System.Management.Automation.Language;
diff --git a/src/System.Management.Automation/engine/ExtraAdapter.cs b/src/System.Management.Automation/engine/ExtraAdapter.cs
index 443cab499a..e7debf5022 100644
--- a/src/System.Management.Automation/engine/ExtraAdapter.cs
+++ b/src/System.Management.Automation/engine/ExtraAdapter.cs
@@ -9,7 +9,6 @@ using System.DirectoryServices;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
-using System.Xml;
using Microsoft.PowerShell;
#pragma warning disable 1634, 1691 // Stops compiler from warning about unknown warnings
diff --git a/src/System.Management.Automation/engine/FilterInfo.cs b/src/System.Management.Automation/engine/FilterInfo.cs
index 1c48fb18af..e7c160c9b2 100644
--- a/src/System.Management.Automation/engine/FilterInfo.cs
+++ b/src/System.Management.Automation/engine/FilterInfo.cs
@@ -2,11 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Management.Automation;
-using System.Text;
-
-
namespace System.Management.Automation
{
///
diff --git a/src/System.Management.Automation/engine/FunctionInfo.cs b/src/System.Management.Automation/engine/FunctionInfo.cs
index 74a056c910..ebba403e74 100644
--- a/src/System.Management.Automation/engine/FunctionInfo.cs
+++ b/src/System.Management.Automation/engine/FunctionInfo.cs
@@ -2,11 +2,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Text;
using System.Management.Automation.Runspaces;
-using System.Collections.Generic;
-using System.Threading;
using System.Collections.ObjectModel;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/ICommandRuntime.cs b/src/System.Management.Automation/engine/ICommandRuntime.cs
index d2f3d696b6..1a11d97654 100644
--- a/src/System.Management.Automation/engine/ICommandRuntime.cs
+++ b/src/System.Management.Automation/engine/ICommandRuntime.cs
@@ -2,8 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Management.Automation;
using System.Management.Automation.Host;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs
index b50306ef56..f6d5812c01 100644
--- a/src/System.Management.Automation/engine/InitialSessionState.cs
+++ b/src/System.Management.Automation/engine/InitialSessionState.cs
@@ -8,15 +8,12 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Tracing;
-using System.Dynamic;
-using System.Globalization;
using System.IO;
using System.Linq;
using System.Management.Automation.Internal;
using System.Management.Automation.Provider;
using System.Management.Automation.Language;
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Threading;
using Microsoft.PowerShell.Commands;
using Debug = System.Management.Automation.Diagnostics;
diff --git a/src/System.Management.Automation/engine/ItemCmdletProviderInterfaces.cs b/src/System.Management.Automation/engine/ItemCmdletProviderInterfaces.cs
index 49cdc9e976..a4bd9905ec 100644
--- a/src/System.Management.Automation/engine/ItemCmdletProviderInterfaces.cs
+++ b/src/System.Management.Automation/engine/ItemCmdletProviderInterfaces.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/ManagementObjectAdapter.cs b/src/System.Management.Automation/engine/ManagementObjectAdapter.cs
index f4f3d454c1..29bd256255 100644
--- a/src/System.Management.Automation/engine/ManagementObjectAdapter.cs
+++ b/src/System.Management.Automation/engine/ManagementObjectAdapter.cs
@@ -2,14 +2,11 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System.Xml;
-using System.Data;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Collections.Specialized;
-using System.Management;
using System.Globalization;
using System.ComponentModel;
using System.Management.Automation.Internal;
diff --git a/src/System.Management.Automation/engine/MergedCommandParameterMetadata.cs b/src/System.Management.Automation/engine/MergedCommandParameterMetadata.cs
index 83fb9df1d6..843d08267b 100644
--- a/src/System.Management.Automation/engine/MergedCommandParameterMetadata.cs
+++ b/src/System.Management.Automation/engine/MergedCommandParameterMetadata.cs
@@ -5,8 +5,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
-using System.Linq.Expressions;
-using System.Reflection;
using System.Text;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/Modules/GetModuleCommand.cs b/src/System.Management.Automation/engine/Modules/GetModuleCommand.cs
index a62cf74755..bdbc9b57f9 100644
--- a/src/System.Management.Automation/engine/Modules/GetModuleCommand.cs
+++ b/src/System.Management.Automation/engine/Modules/GetModuleCommand.cs
@@ -13,7 +13,6 @@ using System.Management.Automation.Language;
using System.Management.Automation.Runspaces;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using System.Text.RegularExpressions;
using System.Threading;
using Microsoft.Management.Infrastructure;
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs b/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
index 29d1ac9824..837c6fb167 100644
--- a/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
+++ b/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs
@@ -23,7 +23,6 @@ using System.Management.Automation.Language;
using Parser = System.Management.Automation.Language.Parser;
using ScriptBlock = System.Management.Automation.ScriptBlock;
using Token = System.Management.Automation.Language.Token;
-using System.Collections.ObjectModel;
using Microsoft.PowerShell.Telemetry.Internal;
#if CORECLR
diff --git a/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs b/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs
index 52dced20c1..122306fb98 100644
--- a/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs
+++ b/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs
@@ -18,9 +18,7 @@ using System.Reflection;
using System.Text;
using System.Xml;
using Microsoft.PowerShell.Cmdletization;
-using Microsoft.Win32;
using Dbg = System.Management.Automation.Diagnostics;
-using System.Management.Automation.Language;
#if CORECLR
// Some APIs are missing from System.Environment. We use System.Management.Automation.Environment as a proxy type:
diff --git a/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs b/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs
index 3e39839cea..fcf209574a 100644
--- a/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs
+++ b/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs
@@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.IO;
using System.Management.Automation.Internal;
using System.Management.Automation.Language;
-using System.Management.Automation.Runspaces;
using Microsoft.PowerShell.Commands;
using System.Linq;
using System.Threading;
diff --git a/src/System.Management.Automation/engine/Modules/ScriptAnalysis.cs b/src/System.Management.Automation/engine/Modules/ScriptAnalysis.cs
index b4afb1aba4..8e9c3ef174 100644
--- a/src/System.Management.Automation/engine/Modules/ScriptAnalysis.cs
+++ b/src/System.Management.Automation/engine/Modules/ScriptAnalysis.cs
@@ -4,12 +4,10 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System.Collections;
using System.Globalization;
-using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Management.Automation.Language;
-using System.Reflection;
using System.Text.RegularExpressions;
#if CORECLR
diff --git a/src/System.Management.Automation/engine/Modules/TestModuleManifestCommand.cs b/src/System.Management.Automation/engine/Modules/TestModuleManifestCommand.cs
index b8ca0d1d6d..c6a378a9cc 100644
--- a/src/System.Management.Automation/engine/Modules/TestModuleManifestCommand.cs
+++ b/src/System.Management.Automation/engine/Modules/TestModuleManifestCommand.cs
@@ -8,7 +8,6 @@ using System.IO;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Internal;
-using System.Collections.Generic;
using System.Collections;
//
diff --git a/src/System.Management.Automation/engine/MshObjectTypeDescriptor.cs b/src/System.Management.Automation/engine/MshObjectTypeDescriptor.cs
index 5cd1002af6..6cc84a1b7f 100644
--- a/src/System.Management.Automation/engine/MshObjectTypeDescriptor.cs
+++ b/src/System.Management.Automation/engine/MshObjectTypeDescriptor.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.ComponentModel;
using System.Management.Automation.Runspaces;
diff --git a/src/System.Management.Automation/engine/MshSecurityException.cs b/src/System.Management.Automation/engine/MshSecurityException.cs
index 3bd887546e..00d7fe5ecd 100644
--- a/src/System.Management.Automation/engine/MshSecurityException.cs
+++ b/src/System.Management.Automation/engine/MshSecurityException.cs
@@ -2,8 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Reflection;
using System.Runtime.Serialization;
#if CORECLR
diff --git a/src/System.Management.Automation/engine/MshSnapinQualifiedName.cs b/src/System.Management.Automation/engine/MshSnapinQualifiedName.cs
index 8a65bbcde3..fc70593827 100644
--- a/src/System.Management.Automation/engine/MshSnapinQualifiedName.cs
+++ b/src/System.Management.Automation/engine/MshSnapinQualifiedName.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using Dbg = System.Management.Automation.Diagnostics;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/NativeCommand.cs b/src/System.Management.Automation/engine/NativeCommand.cs
index 18af40f3bc..f2f1c22cb6 100644
--- a/src/System.Management.Automation/engine/NativeCommand.cs
+++ b/src/System.Management.Automation/engine/NativeCommand.cs
@@ -2,9 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Management.Automation;
-using System.Diagnostics;
using System.Management.Automation.Internal;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs b/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs
index e65202ef19..45a20e5b7c 100644
--- a/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs
+++ b/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs
@@ -5,7 +5,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System.Collections;
using System.Collections.ObjectModel;
using System.Management.Automation.Internal;
-using System.Runtime.InteropServices;
using System.Text;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/NullString.cs b/src/System.Management.Automation/engine/NullString.cs
index 001d5b8ae4..75e38aec59 100644
--- a/src/System.Management.Automation/engine/NullString.cs
+++ b/src/System.Management.Automation/engine/NullString.cs
@@ -2,8 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-
namespace System.Management.Automation.Language
{
///
diff --git a/src/System.Management.Automation/engine/PSMI/PSNegotiationData.cs b/src/System.Management.Automation/engine/PSMI/PSNegotiationData.cs
index 23899138e5..5621ed7c54 100644
--- a/src/System.Management.Automation/engine/PSMI/PSNegotiationData.cs
+++ b/src/System.Management.Automation/engine/PSMI/PSNegotiationData.cs
@@ -1,5 +1,4 @@
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
+using System.Runtime.InteropServices;
using Microsoft.Management.Infrastructure;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/PSMI/PSPowerShellPipeline.cs b/src/System.Management.Automation/engine/PSMI/PSPowerShellPipeline.cs
index 21b8a12f32..e6c17ef385 100644
--- a/src/System.Management.Automation/engine/PSMI/PSPowerShellPipeline.cs
+++ b/src/System.Management.Automation/engine/PSMI/PSPowerShellPipeline.cs
@@ -1,5 +1,4 @@
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
+using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/PSMI/Serialization/InternalMISerializer.cs b/src/System.Management.Automation/engine/PSMI/Serialization/InternalMISerializer.cs
index 96bed98d01..84ef0ff690 100644
--- a/src/System.Management.Automation/engine/PSMI/Serialization/InternalMISerializer.cs
+++ b/src/System.Management.Automation/engine/PSMI/Serialization/InternalMISerializer.cs
@@ -2,28 +2,15 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
using System.Globalization;
-using System.IO;
-using System.Linq;
using System.Management.Automation.Internal;
-using System.Management.Automation.Language;
using System.Management.Automation.Runspaces;
using System.Management.Automation.Tracing;
-using System.Runtime.CompilerServices;
-using System.Security;
-using System.Text;
-using System.Xml;
using Microsoft.Management.Infrastructure;
-using Microsoft.Management.Infrastructure.Serialization;
-using Microsoft.PowerShell;
using Dbg = System.Management.Automation.Diagnostics;
-using System.Management.Automation.Remoting;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/PSMI/Serialization/KnownMITypes.cs b/src/System.Management.Automation/engine/PSMI/Serialization/KnownMITypes.cs
index 7b7eb8ed4e..3309a34233 100644
--- a/src/System.Management.Automation/engine/PSMI/Serialization/KnownMITypes.cs
+++ b/src/System.Management.Automation/engine/PSMI/Serialization/KnownMITypes.cs
@@ -2,27 +2,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Management.Automation.Internal;
-using System.Management.Automation.Language;
-using System.Management.Automation.Runspaces;
-using System.Management.Automation.Tracing;
-using System.Runtime.CompilerServices;
-using System.Security;
-using System.Text;
-using System.Xml;
-using Microsoft.Management.Infrastructure;
-using Microsoft.Management.Infrastructure.Serialization;
-using Microsoft.PowerShell;
using Dbg = System.Management.Automation.Diagnostics;
-using System.Management.Automation.Remoting;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/PSMI/Serialization/MISerializer.cs b/src/System.Management.Automation/engine/PSMI/Serialization/MISerializer.cs
index 69d6bc35d7..d0fc978cbf 100644
--- a/src/System.Management.Automation/engine/PSMI/Serialization/MISerializer.cs
+++ b/src/System.Management.Automation/engine/PSMI/Serialization/MISerializer.cs
@@ -2,27 +2,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Management.Automation.Internal;
-using System.Management.Automation.Language;
-using System.Management.Automation.Runspaces;
-using System.Management.Automation.Tracing;
-using System.Runtime.CompilerServices;
-using System.Security;
-using System.Text;
-using System.Xml;
using Microsoft.Management.Infrastructure;
-using Microsoft.Management.Infrastructure.Serialization;
-using Microsoft.PowerShell;
using Dbg = System.Management.Automation.Diagnostics;
-using System.Management.Automation.Remoting;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/PSMI/Serialization/MITypeSerializationInfo.cs b/src/System.Management.Automation/engine/PSMI/Serialization/MITypeSerializationInfo.cs
index aee4482cff..fc58506f35 100644
--- a/src/System.Management.Automation/engine/PSMI/Serialization/MITypeSerializationInfo.cs
+++ b/src/System.Management.Automation/engine/PSMI/Serialization/MITypeSerializationInfo.cs
@@ -2,27 +2,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Diagnostics.CodeAnalysis;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Management.Automation.Internal;
-using System.Management.Automation.Language;
-using System.Management.Automation.Runspaces;
-using System.Management.Automation.Tracing;
-using System.Runtime.CompilerServices;
-using System.Security;
-using System.Text;
-using System.Xml;
using Microsoft.Management.Infrastructure;
-using Microsoft.Management.Infrastructure.Serialization;
-using Microsoft.PowerShell;
using Dbg = System.Management.Automation.Diagnostics;
-using System.Management.Automation.Remoting;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/PSMI/Serialization/PSMISerializer.cs b/src/System.Management.Automation/engine/PSMI/Serialization/PSMISerializer.cs
index ee33dde771..e25b16cac6 100644
--- a/src/System.Management.Automation/engine/PSMI/Serialization/PSMISerializer.cs
+++ b/src/System.Management.Automation/engine/PSMI/Serialization/PSMISerializer.cs
@@ -1,19 +1,5 @@
-using System.IO;
-using System.Linq;
-using System.Management.Automation.Internal;
-using System.Management.Automation.Language;
-using System.Management.Automation.Runspaces;
-using System.Management.Automation.Tracing;
-using System.Runtime.CompilerServices;
-using System.Security;
-using System.Text;
-using System.Xml;
-using Microsoft.Management.Infrastructure;
-using Microsoft.Management.Infrastructure.Serialization;
-using Microsoft.PowerShell;
+using Microsoft.Management.Infrastructure;
using Dbg = System.Management.Automation.Diagnostics;
-using System.Management.Automation.Remoting;
-using System.Collections.Generic;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/ParameterBinderController.cs b/src/System.Management.Automation/engine/ParameterBinderController.cs
index 77b47296b0..582d6320e1 100644
--- a/src/System.Management.Automation/engine/ParameterBinderController.cs
+++ b/src/System.Management.Automation/engine/ParameterBinderController.cs
@@ -2,12 +2,10 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
-using System.Management.Automation.Internal;
using System.Management.Automation.Language;
using System.Text;
diff --git a/src/System.Management.Automation/engine/ParameterInfo.cs b/src/System.Management.Automation/engine/ParameterInfo.cs
index 7771949560..12d0a13d62 100644
--- a/src/System.Management.Automation/engine/ParameterInfo.cs
+++ b/src/System.Management.Automation/engine/ParameterInfo.cs
@@ -2,10 +2,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.Management.Automation;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/ParameterSetInfo.cs b/src/System.Management.Automation/engine/ParameterSetInfo.cs
index 3f7e451246..7b9f40174b 100644
--- a/src/System.Management.Automation/engine/ParameterSetInfo.cs
+++ b/src/System.Management.Automation/engine/ParameterSetInfo.cs
@@ -2,11 +2,9 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
-using System.Management.Automation;
using System.Linq;
using System.Text.RegularExpressions;
using Microsoft.PowerShell;
diff --git a/src/System.Management.Automation/engine/ParameterSetPromptingData.cs b/src/System.Management.Automation/engine/ParameterSetPromptingData.cs
index 09f56e9010..e8b17d337c 100644
--- a/src/System.Management.Automation/engine/ParameterSetPromptingData.cs
+++ b/src/System.Management.Automation/engine/ParameterSetPromptingData.cs
@@ -2,13 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Management.Automation;
-using System.Management.Automation.Internal;
-using System.Management.Automation.Host;
-using System.Text;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/ParameterSetSpecificMetadata.cs b/src/System.Management.Automation/engine/ParameterSetSpecificMetadata.cs
index 70d0d187f0..6a1a8b6674 100644
--- a/src/System.Management.Automation/engine/ParameterSetSpecificMetadata.cs
+++ b/src/System.Management.Automation/engine/ParameterSetSpecificMetadata.cs
@@ -2,10 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Management.Automation;
-
-
namespace System.Management.Automation
{
internal class ParameterSetSpecificMetadata
diff --git a/src/System.Management.Automation/engine/PathInterfaces.cs b/src/System.Management.Automation/engine/PathInterfaces.cs
index 1ccde8e684..c415096496 100644
--- a/src/System.Management.Automation/engine/PathInterfaces.cs
+++ b/src/System.Management.Automation/engine/PathInterfaces.cs
@@ -2,11 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Management.Automation;
using Dbg = System.Management.Automation;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/Pipe.cs b/src/System.Management.Automation/engine/Pipe.cs
index 62ccda703c..1e0a436761 100644
--- a/src/System.Management.Automation/engine/Pipe.cs
+++ b/src/System.Management.Automation/engine/Pipe.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Management.Automation.Runspaces;
diff --git a/src/System.Management.Automation/engine/PositionalCommandParameter.cs b/src/System.Management.Automation/engine/PositionalCommandParameter.cs
index 584310f31c..2bb905c73b 100644
--- a/src/System.Management.Automation/engine/PositionalCommandParameter.cs
+++ b/src/System.Management.Automation/engine/PositionalCommandParameter.cs
@@ -2,12 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Management.Automation;
-using System.Management.Automation.Internal;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/ProgressRecord.cs b/src/System.Management.Automation/engine/ProgressRecord.cs
index cade8aa558..0275794686 100644
--- a/src/System.Management.Automation/engine/ProgressRecord.cs
+++ b/src/System.Management.Automation/engine/ProgressRecord.cs
@@ -2,8 +2,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using Dbg = System.Management.Automation.Diagnostics;
using System.Runtime.Serialization;
+using Dbg = System.Management.Automation.Diagnostics;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/PropertyCmdletProviderInterfaces.cs b/src/System.Management.Automation/engine/PropertyCmdletProviderInterfaces.cs
index 49f3cb8946..fb16765678 100644
--- a/src/System.Management.Automation/engine/PropertyCmdletProviderInterfaces.cs
+++ b/src/System.Management.Automation/engine/PropertyCmdletProviderInterfaces.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/ProviderInterfaces.cs b/src/System.Management.Automation/engine/ProviderInterfaces.cs
index 965acac69e..e0422e9b9f 100644
--- a/src/System.Management.Automation/engine/ProviderInterfaces.cs
+++ b/src/System.Management.Automation/engine/ProviderInterfaces.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Management.Automation.Provider;
diff --git a/src/System.Management.Automation/engine/ProviderNames.cs b/src/System.Management.Automation/engine/ProviderNames.cs
index fa17f783d5..159e68db65 100644
--- a/src/System.Management.Automation/engine/ProviderNames.cs
+++ b/src/System.Management.Automation/engine/ProviderNames.cs
@@ -2,9 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-
-
namespace System.Management.Automation
{
///
diff --git a/src/System.Management.Automation/engine/PseudoParameterBinder.cs b/src/System.Management.Automation/engine/PseudoParameterBinder.cs
index c70dd3a5d0..8c5c41077c 100644
--- a/src/System.Management.Automation/engine/PseudoParameterBinder.cs
+++ b/src/System.Management.Automation/engine/PseudoParameterBinder.cs
@@ -2,11 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
-using System.Collections.ObjectModel;
-using System.Collections.Generic;
-using System.Management.Automation;
using System.Management.Automation.Internal;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/PseudoParameters.cs b/src/System.Management.Automation/engine/PseudoParameters.cs
index 1968744608..56f297d5fe 100644
--- a/src/System.Management.Automation/engine/PseudoParameters.cs
+++ b/src/System.Management.Automation/engine/PseudoParameters.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
diff --git a/src/System.Management.Automation/engine/QuestionMarkVariable.cs b/src/System.Management.Automation/engine/QuestionMarkVariable.cs
index 6d0234ae05..9741c08517 100644
--- a/src/System.Management.Automation/engine/QuestionMarkVariable.cs
+++ b/src/System.Management.Automation/engine/QuestionMarkVariable.cs
@@ -3,11 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-
-
-
-using System;
-
namespace System.Management.Automation
{
///
diff --git a/src/System.Management.Automation/engine/ReflectionParameterBinder.cs b/src/System.Management.Automation/engine/ReflectionParameterBinder.cs
index 58ada86730..a33e70f05b 100644
--- a/src/System.Management.Automation/engine/ReflectionParameterBinder.cs
+++ b/src/System.Management.Automation/engine/ReflectionParameterBinder.cs
@@ -2,10 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Linq;
using System.Linq.Expressions;
using System.Management.Automation.Internal;
using System.Reflection;
diff --git a/src/System.Management.Automation/engine/ScopedItemSearcher.cs b/src/System.Management.Automation/engine/ScopedItemSearcher.cs
index a83385530a..166d74e3cc 100644
--- a/src/System.Management.Automation/engine/ScopedItemSearcher.cs
+++ b/src/System.Management.Automation/engine/ScopedItemSearcher.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/ScriptCommand.cs b/src/System.Management.Automation/engine/ScriptCommand.cs
index c1f2ab7a77..e5c1982dcf 100644
--- a/src/System.Management.Automation/engine/ScriptCommand.cs
+++ b/src/System.Management.Automation/engine/ScriptCommand.cs
@@ -2,12 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
-using System.Management.Automation;
using System.Management.Automation.Internal;
-using System.Reflection;
-using System.Text;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/ScriptCommandProcessor.cs b/src/System.Management.Automation/engine/ScriptCommandProcessor.cs
index 7e0ef36f90..7d6527660c 100644
--- a/src/System.Management.Automation/engine/ScriptCommandProcessor.cs
+++ b/src/System.Management.Automation/engine/ScriptCommandProcessor.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
diff --git a/src/System.Management.Automation/engine/ScriptInfo.cs b/src/System.Management.Automation/engine/ScriptInfo.cs
index afc221a13a..0f9befe97f 100644
--- a/src/System.Management.Automation/engine/ScriptInfo.cs
+++ b/src/System.Management.Automation/engine/ScriptInfo.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation.Runspaces;
using System.Collections.ObjectModel;
diff --git a/src/System.Management.Automation/engine/SecurityManagerBase.cs b/src/System.Management.Automation/engine/SecurityManagerBase.cs
index cbdd0b03c3..ebc5a76812 100644
--- a/src/System.Management.Automation/engine/SecurityManagerBase.cs
+++ b/src/System.Management.Automation/engine/SecurityManagerBase.cs
@@ -3,9 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using Dbg = System.Management.Automation;
-using System.Reflection;
-using System.Collections;
-using System.Security;
using System.Management.Automation.Host;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/SessionStateAliasAPIs.cs b/src/System.Management.Automation/engine/SessionStateAliasAPIs.cs
index 172c0f7384..a68e5bbd0e 100644
--- a/src/System.Management.Automation/engine/SessionStateAliasAPIs.cs
+++ b/src/System.Management.Automation/engine/SessionStateAliasAPIs.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Management.Automation.Runspaces;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/SessionStateCapacityVariable.cs b/src/System.Management.Automation/engine/SessionStateCapacityVariable.cs
index 0b9fa267c9..5efa7b9e5e 100644
--- a/src/System.Management.Automation/engine/SessionStateCapacityVariable.cs
+++ b/src/System.Management.Automation/engine/SessionStateCapacityVariable.cs
@@ -2,9 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Diagnostics.CodeAnalysis; // for fxcop
-using System.Management.Automation;
using System.Globalization;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/SessionStateCmdletAPIs.cs b/src/System.Management.Automation/engine/SessionStateCmdletAPIs.cs
index d86ca15f3d..fef9b35a66 100644
--- a/src/System.Management.Automation/engine/SessionStateCmdletAPIs.cs
+++ b/src/System.Management.Automation/engine/SessionStateCmdletAPIs.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/SessionStateContent.cs b/src/System.Management.Automation/engine/SessionStateContent.cs
index 0d8061f2a1..9da7a5b94c 100644
--- a/src/System.Management.Automation/engine/SessionStateContent.cs
+++ b/src/System.Management.Automation/engine/SessionStateContent.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using System.Management.Automation.Provider;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/SessionStateDynamicProperty.cs b/src/System.Management.Automation/engine/SessionStateDynamicProperty.cs
index 1f30789dfb..9ca09c858f 100644
--- a/src/System.Management.Automation/engine/SessionStateDynamicProperty.cs
+++ b/src/System.Management.Automation/engine/SessionStateDynamicProperty.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using System.Management.Automation.Provider;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/SessionStateFunctionAPIs.cs b/src/System.Management.Automation/engine/SessionStateFunctionAPIs.cs
index 5a700f461f..20d7642eff 100644
--- a/src/System.Management.Automation/engine/SessionStateFunctionAPIs.cs
+++ b/src/System.Management.Automation/engine/SessionStateFunctionAPIs.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Management.Automation.Language;
diff --git a/src/System.Management.Automation/engine/SessionStateItem.cs b/src/System.Management.Automation/engine/SessionStateItem.cs
index cc485d398a..443eae5155 100644
--- a/src/System.Management.Automation/engine/SessionStateItem.cs
+++ b/src/System.Management.Automation/engine/SessionStateItem.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using System.Management.Automation.Provider;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/SessionStateLocationAPIs.cs b/src/System.Management.Automation/engine/SessionStateLocationAPIs.cs
index 2702dcb94b..f0fbaf0f11 100644
--- a/src/System.Management.Automation/engine/SessionStateLocationAPIs.cs
+++ b/src/System.Management.Automation/engine/SessionStateLocationAPIs.cs
@@ -4,11 +4,9 @@ Copyright (c) Microsoft Corporation. All rights reserved.
#pragma warning disable 1634, 1691
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Management.Automation.Provider;
-using System.Threading;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/SessionStateNavigation.cs b/src/System.Management.Automation/engine/SessionStateNavigation.cs
index ccad7a913c..2919b85561 100644
--- a/src/System.Management.Automation/engine/SessionStateNavigation.cs
+++ b/src/System.Management.Automation/engine/SessionStateNavigation.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using System.Management.Automation.Provider;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/SessionStateProperty.cs b/src/System.Management.Automation/engine/SessionStateProperty.cs
index 499c52e797..8f0c3c5d32 100644
--- a/src/System.Management.Automation/engine/SessionStateProperty.cs
+++ b/src/System.Management.Automation/engine/SessionStateProperty.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.ObjectModel;
using System.Management.Automation.Provider;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/SessionStateProviderAPIs.cs b/src/System.Management.Automation/engine/SessionStateProviderAPIs.cs
index a7f0ea90e5..5e9832d578 100644
--- a/src/System.Management.Automation/engine/SessionStateProviderAPIs.cs
+++ b/src/System.Management.Automation/engine/SessionStateProviderAPIs.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Management.Automation.Provider;
diff --git a/src/System.Management.Automation/engine/SessionStatePublic.cs b/src/System.Management.Automation/engine/SessionStatePublic.cs
index ddd6b744db..50849bda24 100644
--- a/src/System.Management.Automation/engine/SessionStatePublic.cs
+++ b/src/System.Management.Automation/engine/SessionStatePublic.cs
@@ -2,13 +2,7 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Management.Automation;
-using System.Management.Automation.Internal;
using System.Management.Automation.Runspaces;
using Dbg = System.Management.Automation;
diff --git a/src/System.Management.Automation/engine/SessionStateScope.cs b/src/System.Management.Automation/engine/SessionStateScope.cs
index 8a53f53db7..d7b9f063da 100644
--- a/src/System.Management.Automation/engine/SessionStateScope.cs
+++ b/src/System.Management.Automation/engine/SessionStateScope.cs
@@ -2,12 +2,10 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Management.Automation.Internal;
-using System.Management.Automation.Runspaces;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/SessionStateScopeAPIs.cs b/src/System.Management.Automation/engine/SessionStateScopeAPIs.cs
index e32b554a8f..979f10db51 100644
--- a/src/System.Management.Automation/engine/SessionStateScopeAPIs.cs
+++ b/src/System.Management.Automation/engine/SessionStateScopeAPIs.cs
@@ -2,9 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections.Generic;
-using System.Threading;
using Dbg = System.Management.Automation;
#pragma warning disable 1634, 1691 // Stops compiler from warning about unknown warnings
diff --git a/src/System.Management.Automation/engine/SessionStateScopeEnumerator.cs b/src/System.Management.Automation/engine/SessionStateScopeEnumerator.cs
index afe4813f01..b5402bb95e 100644
--- a/src/System.Management.Automation/engine/SessionStateScopeEnumerator.cs
+++ b/src/System.Management.Automation/engine/SessionStateScopeEnumerator.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Generic;
diff --git a/src/System.Management.Automation/engine/SessionStateStrings.cs b/src/System.Management.Automation/engine/SessionStateStrings.cs
index 6e800cb97a..59f4136e5b 100644
--- a/src/System.Management.Automation/engine/SessionStateStrings.cs
+++ b/src/System.Management.Automation/engine/SessionStateStrings.cs
@@ -2,12 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Management.Automation;
-using System.Collections;
-using System.IO;
-
-
namespace System.Management.Automation
{
///
diff --git a/src/System.Management.Automation/engine/SessionStateUtils.cs b/src/System.Management.Automation/engine/SessionStateUtils.cs
index 465a6775a6..edbe709a0b 100644
--- a/src/System.Management.Automation/engine/SessionStateUtils.cs
+++ b/src/System.Management.Automation/engine/SessionStateUtils.cs
@@ -2,12 +2,10 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
-using System.Management.Automation;
using Microsoft.PowerShell.Commands;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs b/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs
index 1e0bd498a8..0abd2c3e97 100644
--- a/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs
+++ b/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
diff --git a/src/System.Management.Automation/engine/ShellVariable.cs b/src/System.Management.Automation/engine/ShellVariable.cs
index ba09d28f97..616b52c903 100644
--- a/src/System.Management.Automation/engine/ShellVariable.cs
+++ b/src/System.Management.Automation/engine/ShellVariable.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Management.Automation.Language;
using System.Management.Automation.Runspaces;
using System.Runtime.CompilerServices;
diff --git a/src/System.Management.Automation/engine/SpecialVariables.cs b/src/System.Management.Automation/engine/SpecialVariables.cs
index ac931fe920..91a9fc045c 100644
--- a/src/System.Management.Automation/engine/SpecialVariables.cs
+++ b/src/System.Management.Automation/engine/SpecialVariables.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/TransactedString.cs b/src/System.Management.Automation/engine/TransactedString.cs
index 562d86f81f..0e3a24d688 100644
--- a/src/System.Management.Automation/engine/TransactedString.cs
+++ b/src/System.Management.Automation/engine/TransactedString.cs
@@ -3,13 +3,7 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Diagnostics;
-using System.Runtime.Serialization;
-using System.Runtime.Serialization.Formatters.Binary;
-using System.IO;
using System.Transactions;
-using System.Threading;
-using System.Collections.Generic;
using System.Text;
namespace Microsoft.PowerShell.Commands.Management
diff --git a/src/System.Management.Automation/engine/TransactionManager.cs b/src/System.Management.Automation/engine/TransactionManager.cs
index 842d757896..2b91a6c4d6 100644
--- a/src/System.Management.Automation/engine/TransactionManager.cs
+++ b/src/System.Management.Automation/engine/TransactionManager.cs
@@ -4,7 +4,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Transactions;
using System.Management.Automation.Internal;
diff --git a/src/System.Management.Automation/engine/TypeTable.cs b/src/System.Management.Automation/engine/TypeTable.cs
index 0bab1ee058..b2a55d2253 100644
--- a/src/System.Management.Automation/engine/TypeTable.cs
+++ b/src/System.Management.Automation/engine/TypeTable.cs
@@ -16,7 +16,6 @@ using System.Management.Automation.Language;
using System.Reflection;
using System.Runtime.Serialization;
using System.Security;
-using System.Threading.Tasks;
using System.Xml;
using Dbg = System.Diagnostics.Debug;
#if !CORECLR
diff --git a/src/System.Management.Automation/engine/Utils.cs b/src/System.Management.Automation/engine/Utils.cs
index 0c783d116c..70f447955d 100644
--- a/src/System.Management.Automation/engine/Utils.cs
+++ b/src/System.Management.Automation/engine/Utils.cs
@@ -17,7 +17,6 @@ using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.ComponentModel;
-using System.Management.Automation.Language;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Text;
diff --git a/src/System.Management.Automation/engine/VariableAttributeCollection.cs b/src/System.Management.Automation/engine/VariableAttributeCollection.cs
index ade5a6947d..dfe5db5ba4 100644
--- a/src/System.Management.Automation/engine/VariableAttributeCollection.cs
+++ b/src/System.Management.Automation/engine/VariableAttributeCollection.cs
@@ -2,12 +2,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using Dbg = System.Management.Automation;
-using System.Collections;
using System.Collections.ObjectModel;
-using System.IO;
-using System.Threading;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/VariableInterfaces.cs b/src/System.Management.Automation/engine/VariableInterfaces.cs
index 777fa4b857..ba32a469d7 100644
--- a/src/System.Management.Automation/engine/VariableInterfaces.cs
+++ b/src/System.Management.Automation/engine/VariableInterfaces.cs
@@ -2,10 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.Collections;
-using System.Globalization;
-using System.Management.Automation;
using Dbg = System.Management.Automation;
namespace System.Management.Automation
diff --git a/src/System.Management.Automation/engine/VariablePath.cs b/src/System.Management.Automation/engine/VariablePath.cs
index d6c0b00f02..dbe5eaf24c 100644
--- a/src/System.Management.Automation/engine/VariablePath.cs
+++ b/src/System.Management.Automation/engine/VariablePath.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
diff --git a/src/System.Management.Automation/engine/cmdlet.cs b/src/System.Management.Automation/engine/cmdlet.cs
index 330f3bd0b0..0312141f09 100644
--- a/src/System.Management.Automation/engine/cmdlet.cs
+++ b/src/System.Management.Automation/engine/cmdlet.cs
@@ -4,20 +4,12 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Diagnostics.CodeAnalysis;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.Globalization;
-using System.Management.Automation;
using System.Reflection;
-using System.Text;
-using System.Diagnostics;
using System.Resources;
-using System.Management.Automation.Host;
-using System.Management.Automation.Internal.Host;
-using System.Threading;
using System.Management.Automation.Internal;
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/System.Management.Automation/engine/debugger/debugger.cs b/src/System.Management.Automation/engine/debugger/debugger.cs
index 0da8a19f58..036db02ecb 100644
--- a/src/System.Management.Automation/engine/debugger/debugger.cs
+++ b/src/System.Management.Automation/engine/debugger/debugger.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections;
using System.Diagnostics;
using System.Globalization;
diff --git a/src/System.Management.Automation/engine/hostifaces/AsyncResult.cs b/src/System.Management.Automation/engine/hostifaces/AsyncResult.cs
index 8baa4fdec5..10bcffb9d3 100644
--- a/src/System.Management.Automation/engine/hostifaces/AsyncResult.cs
+++ b/src/System.Management.Automation/engine/hostifaces/AsyncResult.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Threading;
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/System.Management.Automation/engine/hostifaces/ChoiceDescription.cs b/src/System.Management.Automation/engine/hostifaces/ChoiceDescription.cs
index da3a6d03e1..576b09f0d6 100644
--- a/src/System.Management.Automation/engine/hostifaces/ChoiceDescription.cs
+++ b/src/System.Management.Automation/engine/hostifaces/ChoiceDescription.cs
@@ -3,8 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-
-using System;
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/System.Management.Automation/engine/hostifaces/Command.cs b/src/System.Management.Automation/engine/hostifaces/Command.cs
index 1e0b3c3ed0..0cf74f72be 100644
--- a/src/System.Management.Automation/engine/hostifaces/Command.cs
+++ b/src/System.Management.Automation/engine/hostifaces/Command.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/System.Management.Automation/engine/hostifaces/Connection.cs b/src/System.Management.Automation/engine/hostifaces/Connection.cs
index d58a57208c..a8aaa9d9f1 100644
--- a/src/System.Management.Automation/engine/hostifaces/Connection.cs
+++ b/src/System.Management.Automation/engine/hostifaces/Connection.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
using System.Threading;
diff --git a/src/System.Management.Automation/engine/hostifaces/ConnectionBase.cs b/src/System.Management.Automation/engine/hostifaces/ConnectionBase.cs
index 7136a61a27..057cddfaab 100644
--- a/src/System.Management.Automation/engine/hostifaces/ConnectionBase.cs
+++ b/src/System.Management.Automation/engine/hostifaces/ConnectionBase.cs
@@ -2,7 +2,6 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* --********************************************************************/
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
diff --git a/src/System.Management.Automation/engine/hostifaces/DefaultHost.cs b/src/System.Management.Automation/engine/hostifaces/DefaultHost.cs
index 3dd2016305..c083a543fa 100644
--- a/src/System.Management.Automation/engine/hostifaces/DefaultHost.cs
+++ b/src/System.Management.Automation/engine/hostifaces/DefaultHost.cs
@@ -4,11 +4,8 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Globalization;
-using System.Diagnostics;
using System.Management.Automation;
using System.Management.Automation.Host;
-using System.Reflection;
-
using Dbg = System.Diagnostics;
namespace Microsoft.PowerShell
diff --git a/src/System.Management.Automation/engine/hostifaces/FieldDescription.cs b/src/System.Management.Automation/engine/hostifaces/FieldDescription.cs
index 83f845547f..1f6712ca1a 100644
--- a/src/System.Management.Automation/engine/hostifaces/FieldDescription.cs
+++ b/src/System.Management.Automation/engine/hostifaces/FieldDescription.cs
@@ -3,8 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-
-using System;
using System.Collections.ObjectModel;
using Dbg = System.Management.Automation.Diagnostics;
diff --git a/src/System.Management.Automation/engine/hostifaces/History.cs b/src/System.Management.Automation/engine/hostifaces/History.cs
index 28471882dd..ba6c3b6794 100644
--- a/src/System.Management.Automation/engine/hostifaces/History.cs
+++ b/src/System.Management.Automation/engine/hostifaces/History.cs
@@ -3,7 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
@@ -13,7 +12,6 @@ using System.Management.Automation.Host;
using System.Management.Automation.Internal;
using System.Management.Automation.Runspaces;
using Dbg = System.Management.Automation.Diagnostics;
-using PipelineResultTypes = System.Management.Automation.Runspaces.PipelineResultTypes;
namespace Microsoft.PowerShell.Commands
diff --git a/src/System.Management.Automation/engine/hostifaces/HostUtilities.cs b/src/System.Management.Automation/engine/hostifaces/HostUtilities.cs
index 76f292241e..1928eed5bb 100644
--- a/src/System.Management.Automation/engine/hostifaces/HostUtilities.cs
+++ b/src/System.Management.Automation/engine/hostifaces/HostUtilities.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
diff --git a/src/System.Management.Automation/engine/hostifaces/InformationalRecord.cs b/src/System.Management.Automation/engine/hostifaces/InformationalRecord.cs
index c1109b45e3..84a67bfee4 100644
--- a/src/System.Management.Automation/engine/hostifaces/InformationalRecord.cs
+++ b/src/System.Management.Automation/engine/hostifaces/InformationalRecord.cs
@@ -2,7 +2,6 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* --********************************************************************/
-using System;
using System.Collections;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
diff --git a/src/System.Management.Automation/engine/hostifaces/InternalHostRawUserInterface.cs b/src/System.Management.Automation/engine/hostifaces/InternalHostRawUserInterface.cs
index d30b12b4ce..eeb2c41659 100644
--- a/src/System.Management.Automation/engine/hostifaces/InternalHostRawUserInterface.cs
+++ b/src/System.Management.Automation/engine/hostifaces/InternalHostRawUserInterface.cs
@@ -3,8 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-
-using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Runspaces;
diff --git a/src/System.Management.Automation/engine/hostifaces/LocalPipeline.cs b/src/System.Management.Automation/engine/hostifaces/LocalPipeline.cs
index 4b3943a876..d39f156826 100644
--- a/src/System.Management.Automation/engine/hostifaces/LocalPipeline.cs
+++ b/src/System.Management.Automation/engine/hostifaces/LocalPipeline.cs
@@ -2,7 +2,6 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* --********************************************************************/
-using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Globalization;
diff --git a/src/System.Management.Automation/engine/hostifaces/MshHost.cs b/src/System.Management.Automation/engine/hostifaces/MshHost.cs
index f3d0bacf38..179d7887e0 100644
--- a/src/System.Management.Automation/engine/hostifaces/MshHost.cs
+++ b/src/System.Management.Automation/engine/hostifaces/MshHost.cs
@@ -2,7 +2,6 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System.IO;
using System.Management.Automation.Runspaces;
using System.Diagnostics.CodeAnalysis;
diff --git a/src/System.Management.Automation/engine/hostifaces/MshHostRawUserInterface.cs b/src/System.Management.Automation/engine/hostifaces/MshHostRawUserInterface.cs
index f21906b383..add0812089 100644
--- a/src/System.Management.Automation/engine/hostifaces/MshHostRawUserInterface.cs
+++ b/src/System.Management.Automation/engine/hostifaces/MshHostRawUserInterface.cs
@@ -3,9 +3,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-
-using System;
-using System.Collections;
using System.Globalization;
#pragma warning disable 1634, 1691 // Stops compiler from warning about unknown warnings
diff --git a/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs b/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs
index 6fc29050d4..67b844ba12 100644
--- a/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs
+++ b/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs
@@ -9,7 +9,6 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Security;
using System.Globalization;
-using Microsoft.Win32;
using System.Management.Automation.Runspaces;
using Microsoft.PowerShell.Commands;
using System.Threading.Tasks;
diff --git a/src/System.Management.Automation/engine/hostifaces/NativeCultureResolver.cs b/src/System.Management.Automation/engine/hostifaces/NativeCultureResolver.cs
index 004ffcc735..9ee1e02365 100644
--- a/src/System.Management.Automation/engine/hostifaces/NativeCultureResolver.cs
+++ b/src/System.Management.Automation/engine/hostifaces/NativeCultureResolver.cs
@@ -21,14 +21,8 @@ These methods are available on Windows Vista and later.
using System;
using System.Globalization;
-using System.Threading;
using System.Runtime.InteropServices;
using System.Text;
-using Microsoft.Win32;
-using System.Collections.ObjectModel;
-using System.Collections.Generic;
-
-using System.Management.Automation;
using Dbg = System.Management.Automation.Diagnostics;
using WORD = System.UInt16;
diff --git a/src/System.Management.Automation/engine/hostifaces/PSCommand.cs b/src/System.Management.Automation/engine/hostifaces/PSCommand.cs
index 9429895672..987efa6a67 100644
--- a/src/System.Management.Automation/engine/hostifaces/PSCommand.cs
+++ b/src/System.Management.Automation/engine/hostifaces/PSCommand.cs
@@ -4,7 +4,6 @@ Copyright (c) Microsoft Corporation. All rights reserved.
using System.Management.Automation.Runspaces;
using Dbg = System.Management.Automation.Diagnostics;
-using System.Collections.ObjectModel;
namespace System.Management.Automation
{
diff --git a/src/System.Management.Automation/engine/hostifaces/PSDataCollection.cs b/src/System.Management.Automation/engine/hostifaces/PSDataCollection.cs
index 3d120d02d3..175b48f715 100644
--- a/src/System.Management.Automation/engine/hostifaces/PSDataCollection.cs
+++ b/src/System.Management.Automation/engine/hostifaces/PSDataCollection.cs
@@ -2,7 +2,6 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* --********************************************************************/
-using System;
using System.Collections;
using System.Collections.ObjectModel;
using System.Collections.Generic;
diff --git a/src/System.Management.Automation/engine/hostifaces/RunspaceInit.cs b/src/System.Management.Automation/engine/hostifaces/RunspaceInit.cs
index b85959d422..46cb04c4e4 100644
--- a/src/System.Management.Automation/engine/hostifaces/RunspaceInit.cs
+++ b/src/System.Management.Automation/engine/hostifaces/RunspaceInit.cs
@@ -2,26 +2,8 @@
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System;
-using System.IO;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Diagnostics;
-using System.Text;
-using System.Threading;
-using System.Management.Automation;
-using System.Management.Automation.Host;
-using Microsoft.PowerShell.Commands;
-using System.Management.Automation.Internal;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
using Dbg = System.Management.Automation.Diagnostics;
using DWORD = System.UInt32;
-using Microsoft.Win32;
-using System.Security;
-
namespace System.Management.Automation.Runspaces
diff --git a/src/System.Management.Automation/engine/hostifaces/internalHostuserInterfacesecurity.cs b/src/System.Management.Automation/engine/hostifaces/internalHostuserInterfacesecurity.cs
index 8a09fece9e..fab3f2ae76 100644
--- a/src/System.Management.Automation/engine/hostifaces/internalHostuserInterfacesecurity.cs
+++ b/src/System.Management.Automation/engine/hostifaces/internalHostuserInterfacesecurity.cs
@@ -3,12 +3,8 @@ Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
-using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Runspaces;
-using System.Collections.ObjectModel;
-using System.Security;
-
using Dbg = System.Management.Automation.Diagnostics;
namespace System.Management.Automation.Internal.Host
diff --git a/src/System.Management.Automation/engine/hostifaces/pipelinebase.cs b/src/System.Management.Automation/engine/hostifaces/pipelinebase.cs
index a6a9d0c8af..74ff3cd013 100644
--- a/src/System.Management.Automation/engine/hostifaces/pipelinebase.cs
+++ b/src/System.Management.Automation/engine/hostifaces/pipelinebase.cs
@@ -5,8 +5,6 @@
namespace System.Management.Automation.Runspaces
{
using System;
- using System.IO;
- using System.Globalization;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
diff --git a/src/System.Management.Automation/engine/interpreter/AddInstruction.cs b/src/System.Management.Automation/engine/interpreter/AddInstruction.cs
index f0f0232131..ef9e74341b 100644
--- a/src/System.Management.Automation/engine/interpreter/AddInstruction.cs
+++ b/src/System.Management.Automation/engine/interpreter/AddInstruction.cs
@@ -13,7 +13,6 @@
*
* ***************************************************************************/
-using System;
using System.Diagnostics;
using System.Reflection;
diff --git a/src/System.Management.Automation/engine/interpreter/ArrayOperations.cs b/src/System.Management.Automation/engine/interpreter/ArrayOperations.cs
index e2a39751f7..cbf0560180 100644
--- a/src/System.Management.Automation/engine/interpreter/ArrayOperations.cs
+++ b/src/System.Management.Automation/engine/interpreter/ArrayOperations.cs
@@ -13,8 +13,6 @@
*
* ***************************************************************************/
-using System;
-
namespace System.Management.Automation.Interpreter
{
internal sealed class NewArrayInitInstruction : Instruction
diff --git a/src/System.Management.Automation/engine/interpreter/BranchLabel.cs b/src/System.Management.Automation/engine/interpreter/BranchLabel.cs
index 531a37e4a6..c047d68fcd 100644
--- a/src/System.Management.Automation/engine/interpreter/BranchLabel.cs
+++ b/src/System.Management.Automation/engine/interpreter/BranchLabel.cs
@@ -13,7 +13,6 @@
*
* ***************************************************************************/
-using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Globalization;
diff --git a/src/System.Management.Automation/engine/interpreter/CallInstruction.cs b/src/System.Management.Automation/engine/interpreter/CallInstruction.cs
index 485d74054e..4d5a7da586 100644
--- a/src/System.Management.Automation/engine/interpreter/CallInstruction.cs
+++ b/src/System.Management.Automation/engine/interpreter/CallInstruction.cs
@@ -13,7 +13,6 @@
*
* ***************************************************************************/
-using System;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/src/System.Management.Automation/engine/interpreter/ControlFlowInstructions.cs b/src/System.Management.Automation/engine/interpreter/ControlFlowInstructions.cs
index e7260054d9..291de3b7e8 100644
--- a/src/System.Management.Automation/engine/interpreter/ControlFlowInstructions.cs
+++ b/src/System.Management.Automation/engine/interpreter/ControlFlowInstructions.cs
@@ -16,8 +16,6 @@
#if !CLR2
using System.Linq.Expressions;
#endif
-
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Management.Automation.Language;
diff --git a/src/System.Management.Automation/engine/interpreter/DivInstruction.cs b/src/System.Management.Automation/engine/interpreter/DivInstruction.cs
index e4e096dd2e..87dad37142 100644
--- a/src/System.Management.Automation/engine/interpreter/DivInstruction.cs
+++ b/src/System.Management.Automation/engine/interpreter/DivInstruction.cs
@@ -13,7 +13,6 @@
*
* ***************************************************************************/
-using System;
using System.Diagnostics;
using System.Reflection;
diff --git a/src/System.Management.Automation/engine/interpreter/DynamicInstructionN.cs b/src/System.Management.Automation/engine/interpreter/DynamicInstructionN.cs
index 4f84132d5f..2bcc0cf7f9 100644
--- a/src/System.Management.Automation/engine/interpreter/DynamicInstructionN.cs
+++ b/src/System.Management.Automation/engine/interpreter/DynamicInstructionN.cs
@@ -13,11 +13,11 @@
*
* ***************************************************************************/
-
-using System;
-using System.Collections.Generic;
using System.Runtime.CompilerServices;
+
+#if CORECLR
using System.Reflection;
+#endif
namespace System.Management.Automation.Interpreter
{
diff --git a/src/System.Management.Automation/engine/interpreter/DynamicSplatInstruction.cs b/src/System.Management.Automation/engine/interpreter/DynamicSplatInstruction.cs
index 3279931df0..36d8011d94 100644
--- a/src/System.Management.Automation/engine/interpreter/DynamicSplatInstruction.cs
+++ b/src/System.Management.Automation/engine/interpreter/DynamicSplatInstruction.cs
@@ -14,10 +14,7 @@
* ***************************************************************************/
-using System;
-using System.Collections.Generic;
using System.Runtime.CompilerServices;
-using System.Reflection;
namespace System.Management.Automation.Interpreter
{
diff --git a/src/System.Management.Automation/engine/interpreter/EqualInstruction.cs b/src/System.Management.Automation/engine/interpreter/EqualInstruction.cs
index 229beddf60..486b372cf6 100644
--- a/src/System.Management.Automation/engine/interpreter/EqualInstruction.cs
+++ b/src/System.Management.Automation/engine/interpreter/EqualInstruction.cs
@@ -13,11 +13,7 @@
*
* ***************************************************************************/
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
using System.Reflection;
-using System.Runtime.CompilerServices;
namespace System.Management.Automation.Interpreter
{
diff --git a/src/System.Management.Automation/engine/interpreter/FieldOperations.cs b/src/System.Management.Automation/engine/interpreter/FieldOperations.cs
index 489139b3b6..2eac254555 100644
--- a/src/System.Management.Automation/engine/interpreter/FieldOperations.cs
+++ b/src/System.Management.Automation/engine/interpreter/FieldOperations.cs
@@ -13,11 +13,8 @@
*
* ***************************************************************************/
-using System;
-using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
-using System.Runtime.CompilerServices;
namespace System.Management.Automation.Interpreter
{
diff --git a/src/System.Management.Automation/engine/interpreter/GreaterThanInstruction.cs b/src/System.Management.Automation/engine/interpreter/GreaterThanInstruction.cs
index fdc95c2431..1da52ea81d 100644
--- a/src/System.Management.Automation/engine/interpreter/GreaterThanInstruction.cs
+++ b/src/System.Management.Automation/engine/interpreter/GreaterThanInstruction.cs
@@ -13,11 +13,8 @@
*
* ***************************************************************************/
-using System;
-using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
-using System.Runtime.CompilerServices;
namespace System.Management.Automation.Interpreter
{
diff --git a/src/System.Management.Automation/engine/interpreter/ILightCallSiteBinder.cs b/src/System.Management.Automation/engine/interpreter/ILightCallSiteBinder.cs
index a994e5bb0f..cb538e96c3 100644
--- a/src/System.Management.Automation/engine/interpreter/ILightCallSiteBinder.cs
+++ b/src/System.Management.Automation/engine/interpreter/ILightCallSiteBinder.cs
@@ -14,17 +14,10 @@
* ***************************************************************************/
#if !CLR2
-using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-using System;
-using System.Reflection;
-using System.Management.Automation.Interpreter;
-using System.Runtime.CompilerServices;
-using System.Collections.Generic;
-
namespace System.Management.Automation.Interpreter
{
internal interface ILightCallSiteBinder
diff --git a/src/System.Management.Automation/engine/interpreter/Instruction.cs b/src/System.Management.Automation/engine/interpreter/Instruction.cs
index 542ba84e64..c24f05f145 100644
--- a/src/System.Management.Automation/engine/interpreter/Instruction.cs
+++ b/src/System.Management.Automation/engine/interpreter/Instruction.cs
@@ -13,11 +13,7 @@
*
* ***************************************************************************/
-using System;
using System.Collections.Generic;
-using System.Diagnostics;
-using System.Reflection;
-using System.Runtime.CompilerServices;
namespace System.Management.Automation.Interpreter
{
diff --git a/src/System.Management.Automation/engine/interpreter/InstructionList.cs b/src/System.Management.Automation/engine/interpreter/InstructionList.cs
index 8dee16fe6e..e022e93b35 100644
--- a/src/System.Management.Automation/engine/interpreter/InstructionList.cs
+++ b/src/System.Management.Automation/engine/interpreter/InstructionList.cs
@@ -15,7 +15,6 @@
// Enables instruction counting and displaying stats at process exit.
// #define STATS
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
diff --git a/src/System.Management.Automation/engine/interpreter/InterpretedFrame.cs b/src/System.Management.Automation/engine/interpreter/InterpretedFrame.cs
index 44dfd0c2c8..8e5e5af308 100644
--- a/src/System.Management.Automation/engine/interpreter/InterpretedFrame.cs
+++ b/src/System.Management.Automation/engine/interpreter/InterpretedFrame.cs
@@ -14,12 +14,9 @@
* ***************************************************************************/
#if !CLR2
-using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Management.Automation.Language;
diff --git a/src/System.Management.Automation/engine/interpreter/Interpreter.cs b/src/System.Management.Automation/engine/interpreter/Interpreter.cs
index 1a40488087..18a5de62b2 100644
--- a/src/System.Management.Automation/engine/interpreter/Interpreter.cs
+++ b/src/System.Management.Automation/engine/interpreter/Interpreter.cs
@@ -14,7 +14,6 @@
* ***************************************************************************/
#if !CLR2
-using System.Linq;
using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
@@ -24,9 +23,6 @@ using Microsoft.Scripting.Ast;
// Use stub for SpecialNameAttribute
using Microsoft.PowerShell.CoreClr.Stubs;
#endif
-
-using System;
-using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
diff --git a/src/System.Management.Automation/engine/interpreter/LabelInfo.cs b/src/System.Management.Automation/engine/interpreter/LabelInfo.cs
index a8f5760aa7..85b03980ad 100644
--- a/src/System.Management.Automation/engine/interpreter/LabelInfo.cs
+++ b/src/System.Management.Automation/engine/interpreter/LabelInfo.cs
@@ -20,11 +20,7 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections.Generic;
-using System.Text;
-using System.Reflection.Emit;
using System.Diagnostics;
namespace System.Management.Automation.Interpreter
diff --git a/src/System.Management.Automation/engine/interpreter/LessThanInstruction.cs b/src/System.Management.Automation/engine/interpreter/LessThanInstruction.cs
index fd90930915..a9e357f62f 100644
--- a/src/System.Management.Automation/engine/interpreter/LessThanInstruction.cs
+++ b/src/System.Management.Automation/engine/interpreter/LessThanInstruction.cs
@@ -13,11 +13,8 @@
*
* ***************************************************************************/
-using System;
-using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
-using System.Runtime.CompilerServices;
namespace System.Management.Automation.Interpreter
{
diff --git a/src/System.Management.Automation/engine/interpreter/LightCompiler.cs b/src/System.Management.Automation/engine/interpreter/LightCompiler.cs
index 7b09adc82a..b06dd5a871 100644
--- a/src/System.Management.Automation/engine/interpreter/LightCompiler.cs
+++ b/src/System.Management.Automation/engine/interpreter/LightCompiler.cs
@@ -23,8 +23,6 @@ using System.Linq.Expressions;
// Use stubs for Serializable attribute and SystemException
using Microsoft.PowerShell.CoreClr.Stubs;
#endif
-
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
diff --git a/src/System.Management.Automation/engine/interpreter/LightDelegateCreator.cs b/src/System.Management.Automation/engine/interpreter/LightDelegateCreator.cs
index 12daf7f9b7..6f1057b260 100644
--- a/src/System.Management.Automation/engine/interpreter/LightDelegateCreator.cs
+++ b/src/System.Management.Automation/engine/interpreter/LightDelegateCreator.cs
@@ -16,12 +16,9 @@
#if !CLR2
using System.Linq.Expressions;
#endif
-
-using System;
-using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
-using System.Threading;
+
//using Microsoft.Scripting.Generation;
namespace System.Management.Automation.Interpreter
diff --git a/src/System.Management.Automation/engine/interpreter/LightLambda.cs b/src/System.Management.Automation/engine/interpreter/LightLambda.cs
index ea2566e325..8d934e72a0 100644
--- a/src/System.Management.Automation/engine/interpreter/LightLambda.cs
+++ b/src/System.Management.Automation/engine/interpreter/LightLambda.cs
@@ -18,8 +18,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
diff --git a/src/System.Management.Automation/engine/interpreter/LightLambdaClosureVisitor.cs b/src/System.Management.Automation/engine/interpreter/LightLambdaClosureVisitor.cs
index 3e38a495f9..69969208f6 100644
--- a/src/System.Management.Automation/engine/interpreter/LightLambdaClosureVisitor.cs
+++ b/src/System.Management.Automation/engine/interpreter/LightLambdaClosureVisitor.cs
@@ -18,8 +18,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using AstUtils = System.Management.Automation.Interpreter.Utils;
diff --git a/src/System.Management.Automation/engine/interpreter/LocalAccess.cs b/src/System.Management.Automation/engine/interpreter/LocalAccess.cs
index be8b89766f..22ef50cc2b 100644
--- a/src/System.Management.Automation/engine/interpreter/LocalAccess.cs
+++ b/src/System.Management.Automation/engine/interpreter/LocalAccess.cs
@@ -14,12 +14,9 @@
* ***************************************************************************/
#if !CLR2
-using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Collections.Generic;
diff --git a/src/System.Management.Automation/engine/interpreter/LocalVariables.cs b/src/System.Management.Automation/engine/interpreter/LocalVariables.cs
index c18e39d7d9..42c5597f24 100644
--- a/src/System.Management.Automation/engine/interpreter/LocalVariables.cs
+++ b/src/System.Management.Automation/engine/interpreter/LocalVariables.cs
@@ -19,8 +19,6 @@ using System.Linq.Expressions;
#else
using Microsoft.Scripting.Ast;
#endif
-
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
diff --git a/src/System.Management.Automation/engine/interpreter/LoopCompiler.cs b/src/System.Management.Automation/engine/interpreter/LoopCompiler.cs
index 811b7889de..09a59aa157 100644
--- a/src/System.Management.Automation/engine/interpreter/LoopCompiler.cs
+++ b/src/System.Management.Automation/engine/interpreter/LoopCompiler.cs
@@ -16,8 +16,6 @@
#if !CLR2
using System.Linq.Expressions;
#endif
-
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Management.Automation.Language;
@@ -27,7 +25,6 @@ namespace System.Management.Automation.Interpreter
{
using AstUtils = System.Management.Automation.Interpreter.Utils;
using LoopFunc = Func