diff --git a/Desktop.Win/ViewModels/MainWindowViewModel.cs b/Desktop.Win/ViewModels/MainWindowViewModel.cs index 1627a691..63963368 100644 --- a/Desktop.Win/ViewModels/MainWindowViewModel.cs +++ b/Desktop.Win/ViewModels/MainWindowViewModel.cs @@ -176,6 +176,7 @@ namespace Remotely.Desktop.Win.ViewModels { App.Current.Dispatcher.Invoke(() => { + App.Current.MainWindow.Activate(); var result = MessageBox.Show(Application.Current.MainWindow, $"You've received a connection request from {screenCastRequest.RequesterName}. Accept?", "Connection Request", MessageBoxButton.YesNo, MessageBoxImage.Question); if (result == MessageBoxResult.Yes) { diff --git a/ScreenCast.Core/Capture/ScreenCasterBase.cs b/ScreenCast.Core/Capture/ScreenCasterBase.cs index 75e9027c..8e16772c 100644 --- a/ScreenCast.Core/Capture/ScreenCasterBase.cs +++ b/ScreenCast.Core/Capture/ScreenCasterBase.cs @@ -13,20 +13,53 @@ using System.Threading.Tasks; using Remotely.Shared.Services; using Remotely.Shared.Win32; using Remotely.ScreenCast.Core.Interfaces; +using System.Diagnostics; +using System.Threading; namespace Remotely.ScreenCast.Core.Capture { public class ScreenCasterBase { + Conductor conductor; + string desktopName = string.Empty; + byte[] encodedImageBytes; + Queue fpsQueue = new Queue(); + Viewer viewer; + private static SemaphoreSlim ScreenLock { get; } = new SemaphoreSlim(1); + public async Task BeginScreenCasting(string viewerID, string requesterName, ICapturer capturer) { - var conductor = Conductor.Current; - Viewer viewer; - byte[] encodedImageBytes; - + conductor = Conductor.Current; + await ScreenLock.WaitAsync(); + await InitScreenCaster(viewerID, requesterName, capturer); + ScreenLock.Release(); + + while (!viewer.DisconnectRequested) + { + await ScreenLock.WaitAsync(); + await ProcessCurrentFrame(capturer, viewerID); + ScreenLock.Release(); + } + + + Logger.Write($"Ended screen cast. Requester: {requesterName}. Viewer ID: {viewerID}."); + conductor.Viewers.TryRemove(viewerID, out _); + + capturer.Dispose(); + + // Close if no one is viewing. + if (conductor.Viewers.Count == 0 && conductor.Mode == Enums.AppMode.Unattended) + { + await conductor.CasterSocket.Disconnect(); + Environment.Exit(0); + } + } + + private async Task InitScreenCaster(string viewerID, string requesterName, ICapturer capturer) + { Logger.Write($"Starting screen cast. Requester: {requesterName}. Viewer ID: {viewerID}. Capturer: {capturer.GetType().ToString()}. App Mode: {conductor.Mode} Desktop: {conductor.CurrentDesktopName}"); viewer = new Viewer() @@ -59,81 +92,86 @@ namespace Remotely.ScreenCast.Core.Capture await conductor.CasterSocket.SendScreenSize(bounds.Width, bounds.Height, viewerID); }; - var desktopName = string.Empty; if (OSUtils.IsWindows) { desktopName = Win32Interop.GetCurrentDesktop(); } + } - while (!viewer.DisconnectRequested) + private async Task ProcessCurrentFrame(ICapturer capturer, string viewerID) + { + try { - try + WriteFps(); + + if (OSUtils.IsWindows) { - if (OSUtils.IsWindows) + var currentDesktopName = Win32Interop.GetCurrentDesktop(); + if (desktopName.ToLower() != currentDesktopName.ToLower()) { - var currentDesktopName = Win32Interop.GetCurrentDesktop(); - if (desktopName.ToLower() != currentDesktopName.ToLower()) - { - desktopName = currentDesktopName; - Logger.Write($"Switching to desktop {desktopName} in ScreenCaster."); - Win32Interop.SwitchToInputDesktop(); - continue; - } - } - - - - while (viewer.PendingFrames > 10000 / viewer.Latency) - { - await Task.Delay(10); - } - - capturer.Capture(); - - var diffArea = ImageUtils.GetDiffArea(capturer.CurrentFrame, capturer.PreviousFrame, capturer.CaptureFullscreen); - - if (diffArea.IsEmpty) - { - continue; - } - - using (var newImage = capturer.CurrentFrame.Clone(diffArea, System.Drawing.Imaging.PixelFormat.Format32bppArgb)) - { - if (capturer.CaptureFullscreen) - { - capturer.CaptureFullscreen = false; - } - - encodedImageBytes = ImageUtils.EncodeBitmap(newImage, viewer.EncoderParams); - - if (encodedImageBytes?.Length > 0) - { - await conductor.CasterSocket.SendScreenCapture(encodedImageBytes, viewerID, diffArea.Left, diffArea.Top, diffArea.Width, diffArea.Height, DateTime.UtcNow); - viewer.PendingFrames++; - } + desktopName = currentDesktopName; + Logger.Write($"Switching to desktop {desktopName} in ScreenCaster."); + Win32Interop.SwitchToInputDesktop(); + return; } } - catch (Exception ex) + + + if (viewer.PendingFrames > 10) { - Logger.Write(ex); + Logger.Write($"Throttling screen capture. Latency: {viewer.Latency}. Pending Frames: {viewer.PendingFrames}"); + // This is to prevent dead-lock in case updates are missed from the browser. + viewer.PendingFrames = Math.Max(0, viewer.PendingFrames - 1); + await Task.Delay(100); + return; } - finally + + capturer.GetNextFrame(); + + var diffArea = ImageUtils.GetDiffArea(capturer.CurrentFrame, capturer.PreviousFrame, capturer.CaptureFullscreen); + + if (diffArea.IsEmpty) { - // TODO: Even after disposing of the bitmap, GC doesn't collect in time. Memory usage soars quickly. - // Need to revisit this later. - GC.Collect(); + return; + } + + using (var newImage = capturer.CurrentFrame.Clone(diffArea, System.Drawing.Imaging.PixelFormat.Format32bppArgb)) + { + if (capturer.CaptureFullscreen) + { + capturer.CaptureFullscreen = false; + } + + encodedImageBytes = ImageUtils.EncodeBitmap(newImage, viewer.EncoderParams); + + if (encodedImageBytes?.Length > 0) + { + await conductor.CasterSocket.SendScreenCapture(encodedImageBytes, viewerID, diffArea.Left, diffArea.Top, diffArea.Width, diffArea.Height, DateTime.UtcNow); + viewer.PendingFrames++; + } } } - Logger.Write($"Ended screen cast. Requester: {requesterName}. Viewer ID: {viewerID}."); - conductor.Viewers.TryRemove(viewerID, out _); - - capturer.Dispose(); - - // Close if no one is viewing. - if (conductor.Viewers.Count == 0 && conductor.Mode == Enums.AppMode.Unattended) + catch (Exception ex) { - await conductor.CasterSocket.Disconnect(); - Environment.Exit(0); + Logger.Write(ex); + } + finally + { + // TODO: Even after disposing of the bitmap, GC doesn't collect in time. Memory usage soars quickly. + // Need to revisit this later. + GC.Collect(); + } + } + private void WriteFps() + { + if (Conductor.Current.IsDebug) + { + while (fpsQueue.Any() && DateTime.Now - fpsQueue.Peek() > TimeSpan.FromSeconds(1)) + { + fpsQueue.Dequeue(); + } + fpsQueue.Enqueue(DateTime.Now); + Debug.WriteLine("Capture FPS: " + fpsQueue.Count); } } } diff --git a/ScreenCast.Core/Conductor.cs b/ScreenCast.Core/Conductor.cs index b1f66109..492a0faa 100644 --- a/ScreenCast.Core/Conductor.cs +++ b/ScreenCast.Core/Conductor.cs @@ -20,6 +20,7 @@ namespace Remotely.ScreenCast.Core { public static Conductor Current { get; private set; } public IScreenCaster ScreenCaster { get; } + public bool IsDebug { get; } public Conductor(CasterSocket casterSocket, IScreenCaster screenCaster) @@ -27,6 +28,9 @@ namespace Remotely.ScreenCast.Core Current = this; ScreenCaster = screenCaster; CasterSocket = casterSocket; +#if DEBUG + IsDebug = true; +#endif } public event EventHandler ScreenCastRequested; diff --git a/ScreenCast.Core/Interfaces/ICapturer.cs b/ScreenCast.Core/Interfaces/ICapturer.cs index 728ec44a..e911e443 100644 --- a/ScreenCast.Core/Interfaces/ICapturer.cs +++ b/ScreenCast.Core/Interfaces/ICapturer.cs @@ -19,7 +19,7 @@ namespace Remotely.ScreenCast.Core.Interfaces int GetScreenCount(); Rectangle GetVirtualScreenBounds(); - void Capture(); + void GetNextFrame(); void Init(); } } diff --git a/ScreenCast.Core/Sockets/CasterSocket.cs b/ScreenCast.Core/Sockets/CasterSocket.cs index 110f8c1d..09addd43 100644 --- a/ScreenCast.Core/Sockets/CasterSocket.cs +++ b/ScreenCast.Core/Sockets/CasterSocket.cs @@ -275,9 +275,9 @@ namespace Remotely.ScreenCast.Core.Sockets { if (conductor.Viewers.TryGetValue(viewerID, out var viewer)) { - viewer.PendingFrames--; var latency = DateTime.UtcNow - sentTime; viewer.Latency = latency.TotalMilliseconds; + viewer.PendingFrames = Math.Max(0, viewer.PendingFrames - 1); } }); diff --git a/ScreenCast.Linux/Capture/X11Capture.cs b/ScreenCast.Linux/Capture/X11Capture.cs index 78d62f77..2a9c8b0e 100644 --- a/ScreenCast.Linux/Capture/X11Capture.cs +++ b/ScreenCast.Linux/Capture/X11Capture.cs @@ -26,7 +26,7 @@ namespace Remotely.ScreenCast.Linux.Capture public Bitmap PreviousFrame { get; set; } public event EventHandler ScreenChanged; public int SelectedScreen { get; private set; } = -1; - public void Capture() + public void GetNextFrame() { try { diff --git a/ScreenCast.Win/Capture/BitBltCapture.cs b/ScreenCast.Win/Capture/BitBltCapture.cs index 05e8216a..1c87f9a9 100644 --- a/ScreenCast.Win/Capture/BitBltCapture.cs +++ b/ScreenCast.Win/Capture/BitBltCapture.cs @@ -21,33 +21,14 @@ namespace Remotely.ScreenCast.Win.Capture Init(); } + public event EventHandler ScreenChanged; + public bool CaptureFullscreen { get; set; } = true; public Bitmap CurrentFrame { get; set; } public Rectangle CurrentScreenBounds { get; set; } = Screen.PrimaryScreen.Bounds; public Bitmap PreviousFrame { get; set; } - public event EventHandler ScreenChanged; public int SelectedScreen { get; private set; } = Screen.AllScreens.ToList().IndexOf(Screen.PrimaryScreen); private Graphics Graphic { get; set; } - - private object ScreenLock { get; } = new object(); - - public void Capture() - { - try - { - lock (ScreenLock) - { - PreviousFrame = (Bitmap)CurrentFrame.Clone(); - Graphic.CopyFromScreen(CurrentScreenBounds.Left, CurrentScreenBounds.Top, 0, 0, new Size(CurrentScreenBounds.Width, CurrentScreenBounds.Height)); - } - } - catch (Exception ex) - { - Logger.Write(ex); - Init(); - } - } - public void Dispose() { Graphic.Dispose(); @@ -55,6 +36,19 @@ namespace Remotely.ScreenCast.Win.Capture PreviousFrame.Dispose(); } + public void GetNextFrame() + { + try + { + PreviousFrame = (Bitmap)CurrentFrame.Clone(); + Graphic.CopyFromScreen(CurrentScreenBounds.Left, CurrentScreenBounds.Top, 0, 0, new Size(CurrentScreenBounds.Width, CurrentScreenBounds.Height)); + } + catch (Exception ex) + { + Logger.Write(ex); + Init(); + } + } public int GetScreenCount() { return Screen.AllScreens.Length; @@ -78,21 +72,19 @@ namespace Remotely.ScreenCast.Win.Capture { return; } - lock (ScreenLock) + + if (GetScreenCount() >= screenNumber + 1) { - if (GetScreenCount() >= screenNumber + 1) - { - SelectedScreen = screenNumber; - } - else - { - SelectedScreen = 0; - } - CurrentScreenBounds = Screen.AllScreens[SelectedScreen].Bounds; - CaptureFullscreen = true; - Init(); - ScreenChanged?.Invoke(this, CurrentScreenBounds); + SelectedScreen = screenNumber; } + else + { + SelectedScreen = 0; + } + CurrentScreenBounds = Screen.AllScreens[SelectedScreen].Bounds; + CaptureFullscreen = true; + Init(); + ScreenChanged?.Invoke(this, CurrentScreenBounds); } } } diff --git a/ScreenCast.Win/Capture/DXCapture.cs b/ScreenCast.Win/Capture/DXCapture.cs index 21575476..bb7bec23 100644 --- a/ScreenCast.Win/Capture/DXCapture.cs +++ b/ScreenCast.Win/Capture/DXCapture.cs @@ -3,6 +3,7 @@ using Remotely.ScreenCast.Core.Services; using SharpDX; using SharpDX.Direct3D11; using SharpDX.DXGI; +using SharpDX.Mathematics.Interop; using System; using System.Diagnostics; using System.Drawing; @@ -38,7 +39,7 @@ namespace Remotely.ScreenCast.Win.Capture Init(); } - public void Capture() + public void GetNextFrame() { try { @@ -53,27 +54,29 @@ namespace Remotely.ScreenCast.Win.Capture OutputDuplicateFrameInformation duplicateFrameInformation; // Try to get duplicated frame within given time is ms - duplicatedOutput.TryAcquireNextFrame(50, out duplicateFrameInformation, out screenResource); + duplicatedOutput.TryAcquireNextFrame(100, out duplicateFrameInformation, out screenResource); - while (duplicateFrameInformation.AccumulatedFrames < 1) + if (duplicateFrameInformation.AccumulatedFrames == 0) { - var result = duplicatedOutput.TryAcquireNextFrame(50, out duplicateFrameInformation, out screenResource); - if (result.Failure) + try { - try - { - duplicatedOutput.ReleaseFrame(); - } - catch { } + duplicatedOutput.ReleaseFrame(); } + catch { } + return; } - + + // TODO: Get dirty rects. + //RawRectangle[] dirtyRectsBuffer = new RawRectangle[duplicateFrameInformation.TotalMetadataBufferSize]; + //duplicatedOutput.GetFrameDirtyRects(duplicateFrameInformation.TotalMetadataBufferSize, dirtyRectsBuffer, out var dirtyRectsSizeRequired); + + // copy resource into memory that can be accessed by the CPU using (var screenTexture2D = screenResource.QueryInterface()) { device.ImmediateContext.CopyResource(screenTexture2D, screenTexture); } - + // Get the desktop capture texture var mapSource = device.ImmediateContext.MapSubresource(screenTexture, 0, MapMode.Read, SharpDX.Direct3D11.MapFlags.None); diff --git a/ScreenCast.Win/Services/WinInput.cs b/ScreenCast.Win/Services/WinInput.cs index 48798fc5..d3d12e8b 100644 --- a/ScreenCast.Win/Services/WinInput.cs +++ b/ScreenCast.Win/Services/WinInput.cs @@ -251,6 +251,9 @@ namespace Remotely.ScreenCast.Win.Services case "F12": keyCode = VirtualKey.F12; break; + case "Meta": + keyCode = VirtualKey.LWIN; + break; default: keyCode = (VirtualKey)VkKeyScan(Convert.ToChar(key)); break; diff --git a/ScreenCast.Win/Services/WinScreenCaster.cs b/ScreenCast.Win/Services/WinScreenCaster.cs index 7b831ed8..3e672427 100644 --- a/ScreenCast.Win/Services/WinScreenCaster.cs +++ b/ScreenCast.Win/Services/WinScreenCaster.cs @@ -34,14 +34,7 @@ namespace Remotely.ScreenCast.Win.Services ICapturer capturer; try { - if (Conductor.Current.Viewers.Count == 0) - { - capturer = new DXCapture(); - } - else - { - capturer = new BitBltCapture(); - } + capturer = new DXCapture(); } catch (Exception ex) { diff --git a/Server/wwwroot/scripts/Commands/PSCoreCommands.js b/Server/wwwroot/scripts/Commands/PSCoreCommands.js index ff4c3564..f7d03606 100644 --- a/Server/wwwroot/scripts/Commands/PSCoreCommands.js +++ b/Server/wwwroot/scripts/Commands/PSCoreCommands.js @@ -7,16 +7,14 @@ var commands = [ }), new ConsoleCommand(`Add-DnsClientNrptRule`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`AddDscResourceProperty`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`AddDscResourcePropertyFromMetadata`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Add-EtwTraceProvider`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Add-InitiatorIdToMaskingSet`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Add-MpPreference`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Add-MpPreference`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Add-NetEventNetworkAdapter`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Add-NetEventPacketCaptureProvider`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -53,6 +51,12 @@ var commands = [ }), new ConsoleCommand(`Add-PhysicalDisk`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Add-Printer`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Add-PrinterDriver`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Add-PrinterPort`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Add-StorageFaultDomain`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Add-TargetPortToMaskingSet`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -69,6 +73,10 @@ var commands = [ }), new ConsoleCommand(`Add-VpnConnectionTriggerTrustedNetwork`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`AddDscResourceProperty`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`AddDscResourcePropertyFromMetadata`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Backup-BitLockerKeyProtector`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`BackupToAAD-BitLockerKeyProtector`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -105,22 +113,6 @@ var commands = [ }), new ConsoleCommand(`Connect-VirtualDisk`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`ConvertFrom-SddlString`, [ - new Parameter(`Sddl`, `See help file for details.`, `System.String`), - new Parameter(`Type`, `See help file for details.`, `System.Object`), - new Parameter(`Verbose`, `See help file for details.`, `System.Management.Automation.SwitchParameter`), - new Parameter(`Debug`, `See help file for details.`, `System.Management.Automation.SwitchParameter`), - new Parameter(`ErrorAction`, `See help file for details.`, `System.Management.Automation.ActionPreference`), - new Parameter(`WarningAction`, `See help file for details.`, `System.Management.Automation.ActionPreference`), - new Parameter(`InformationAction`, `See help file for details.`, `System.Management.Automation.ActionPreference`), - new Parameter(`ErrorVariable`, `See help file for details.`, `System.String`), - new Parameter(`WarningVariable`, `See help file for details.`, `System.String`), - new Parameter(`InformationVariable`, `See help file for details.`, `System.String`), - new Parameter(`OutVariable`, `See help file for details.`, `System.String`), - new Parameter(`OutBuffer`, `See help file for details.`, `System.Int32`), - new Parameter(`PipelineVariable`, `See help file for details.`, `System.String`), - ], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`ConvertTo-MOFInstance`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Copy-NetFirewallRule`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -185,6 +177,8 @@ var commands = [ }), new ConsoleCommand(`Disable-NetAdapterSriov`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Disable-NetAdapterUso`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Disable-NetAdapterVmq`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Disable-NetDnsTransitionConfiguration`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -281,6 +275,8 @@ var commands = [ }), new ConsoleCommand(`Enable-NetAdapterSriov`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Enable-NetAdapterUso`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Enable-NetAdapterVmq`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Enable-NetDnsTransitionConfiguration`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -355,6 +351,8 @@ var commands = [ }), new ConsoleCommand(`Generate-VersionInfo`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Get-AppBackgroundTask`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Get-AppxLastError`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-AppxLog`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -387,8 +385,6 @@ var commands = [ }), new ConsoleCommand(`Get-ComplexResourceQualifier`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`GetCompositeResource`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Get-ConfigurationErrorCount`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-DAClientExperienceConfiguration`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -437,8 +433,6 @@ var commands = [ }), new ConsoleCommand(`Get-FileStorageTier`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`GetImplementingModulePath`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Get-InitiatorId`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-InitiatorPort`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -455,20 +449,28 @@ var commands = [ }), new ConsoleCommand(`Get-MMAgent`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`GetModule`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Get-MofInstanceName`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-MofInstanceText`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-MpComputerStatus`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Get-MpComputerStatus`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Get-MpPreference`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Get-MpPreference`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-MpThreat`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Get-MpThreat`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Get-MpThreatCatalog`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Get-MpThreatCatalog`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Get-MpThreatDetection`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Get-MpThreatDetection`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-NCSIPolicyConfiguration`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -509,6 +511,8 @@ var commands = [ }), new ConsoleCommand(`Get-NetAdapterStatistics`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Get-NetAdapterUso`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Get-NetAdapterVmq`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-NetAdapterVMQQueue`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -643,16 +647,6 @@ var commands = [ }), new ConsoleCommand(`Get-NetUDPSetting`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`Get-NetVirtualizationCustomerRoute`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Get-NetVirtualizationGlobal`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Get-NetVirtualizationLookupRecord`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Get-NetVirtualizationProviderAddress`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Get-NetVirtualizationProviderRoute`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Get-NetworkSwitchEthernetPort`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-NetworkSwitchFeature`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -673,8 +667,6 @@ var commands = [ }), new ConsoleCommand(`Get-PartitionSupportedSize`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`GetPatterns`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Get-PcsvDevice`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-PcsvDeviceLog`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -693,6 +685,18 @@ var commands = [ }), new ConsoleCommand(`Get-PositionInfo`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Get-PrintConfiguration`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Get-Printer`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Get-PrinterDriver`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Get-PrinterPort`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Get-PrinterProperty`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Get-PrintJob`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Get-PSCurrentConfigurationNode`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-PSDefaultConfigurationDocument`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -711,8 +715,6 @@ var commands = [ }), new ConsoleCommand(`Get-ResiliencySetting`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`GetResourceFromKeyword`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Get-ScheduledTask`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-ScheduledTaskInfo`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -807,8 +809,6 @@ var commands = [ }), new ConsoleCommand(`Get-SupportedFileSystems`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`GetSyntax`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Get-TargetPort`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Get-TargetPortal`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -839,6 +839,18 @@ var commands = [ }), new ConsoleCommand(`Get-WULastScanSuccessDate`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`GetCompositeResource`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`GetImplementingModulePath`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`GetModule`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`GetPatterns`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`GetResourceFromKeyword`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`GetSyntax`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Grant-FileShareAccess`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Grant-SmbShareAccess`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -927,14 +939,6 @@ var commands = [ }), new ConsoleCommand(`New-NetTransportFilter`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`New-NetVirtualizationCustomerRoute`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`New-NetVirtualizationLookupRecord`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`New-NetVirtualizationProviderAddress`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`New-NetVirtualizationProviderRoute`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`New-NetworkSwitchVlan`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`New-Partition`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -995,6 +999,8 @@ var commands = [ }), new ConsoleCommand(`Publish-Script`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Read-PrinterNfcTag`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`ReadEnvironmentFile`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Register-ClusteredScheduledTask`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1029,6 +1035,10 @@ var commands = [ }), new ConsoleCommand(`Remove-MpPreference`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Remove-MpPreference`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Remove-MpThreat`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Remove-MpThreat`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Remove-NetAdapterAdvancedProperty`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1103,14 +1113,6 @@ var commands = [ }), new ConsoleCommand(`Remove-NetTransportFilter`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`Remove-NetVirtualizationCustomerRoute`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Remove-NetVirtualizationLookupRecord`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Remove-NetVirtualizationProviderAddress`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Remove-NetVirtualizationProviderRoute`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Remove-NetworkSwitchEthernetPortIPAddress`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Remove-NetworkSwitchVlan`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1123,6 +1125,14 @@ var commands = [ }), new ConsoleCommand(`Remove-PhysicalDisk`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Remove-Printer`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Remove-PrinterDriver`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Remove-PrinterPort`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Remove-PrintJob`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Remove-SmbBandwidthLimit`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Remove-SmbGlobalMapping`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1187,6 +1197,8 @@ var commands = [ }), new ConsoleCommand(`Rename-NetSwitchTeam`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Rename-Printer`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Repair-FileIntegrity`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Repair-VirtualDisk`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1227,10 +1239,14 @@ var commands = [ }), new ConsoleCommand(`Restart-PcsvDevice`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Restart-PrintJob`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Restore-NetworkSwitchConfiguration`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Resume-BitLocker`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Resume-PrintJob`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Revoke-FileShareAccess`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Revoke-SmbShareAccess`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1245,8 +1261,6 @@ var commands = [ }), new ConsoleCommand(`Save-Script`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`Select-NetVirtualizationNextHop`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Send-EtwTraceSession`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Set-AssignedAccess`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1295,6 +1309,8 @@ var commands = [ }), new ConsoleCommand(`Set-MpPreference`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Set-MpPreference`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Set-NCSIPolicyConfiguration`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Set-Net6to4Configuration`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1327,6 +1343,8 @@ var commands = [ }), new ConsoleCommand(`Set-NetAdapterSriov`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Set-NetAdapterUso`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Set-NetAdapterVmq`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Set-NetConnectionProfile`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1417,16 +1435,6 @@ var commands = [ }), new ConsoleCommand(`Set-NetUDPSetting`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`Set-NetVirtualizationCustomerRoute`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Set-NetVirtualizationGlobal`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Set-NetVirtualizationLookupRecord`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Set-NetVirtualizationProviderAddress`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Set-NetVirtualizationProviderRoute`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Set-NetworkSwitchEthernetPortIPAddress`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Set-NetworkSwitchPortMode`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1457,6 +1465,12 @@ var commands = [ }), new ConsoleCommand(`Set-PhysicalDisk`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Set-PrintConfiguration`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Set-Printer`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Set-PrinterProperty`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Set-PSCurrentConfigurationNode`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Set-PSDefaultConfigurationDocument`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1521,12 +1535,18 @@ var commands = [ }), new ConsoleCommand(`Show-VirtualDisk`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Start-AppBackgroundTask`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Start-AutologgerConfig`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Start-EtwTraceSession`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Start-MpScan`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Start-MpScan`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Start-MpWDOScan`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Start-MpWDOScan`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Start-NetEventSession`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1559,6 +1579,8 @@ var commands = [ }), new ConsoleCommand(`Suspend-BitLocker`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Suspend-PrintJob`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Sync-NetIPsecRule`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Test-ConflictingResources`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1589,6 +1611,8 @@ var commands = [ }), new ConsoleCommand(`Unlock-BitLocker`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Unregister-AppBackgroundTask`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Unregister-ClusteredScheduledTask`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Unregister-PSRepository`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1621,6 +1645,8 @@ var commands = [ }), new ConsoleCommand(`Update-MpSignature`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Update-MpSignature`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Update-NetIPsecRule`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Update-Script`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { @@ -1649,69 +1675,73 @@ var commands = [ }), new ConsoleCommand(`ValidateUpdate-ConfigurationData`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`WriteFile`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Write-Log`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Write-MetaConfigFile`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Write-NodeMOFFile`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Write-PrinterNfcTag`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Write-VolumeCache`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`WriteFile`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Add-AppxPackage`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Add-AppxProvisionedPackage`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Add-AppxVolume`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Add-Content`, [ - new Parameter(`AsByteStream`, `{{Fill AsByteStream Description}}`, `SwitchParameter`), - new Parameter(`Credential`, `Specifies a user account that has permission to perform this action. The default is the current user. + new Parameter(`AsByteStream`, `Specifies that the content should be read as a stream of bytes. This parameter was introduced in PowerShell 6.0. -Type a user name, such as "User01" or "Domain01\User01", or enter a PSCredential object, such as one generated by the "Get-Credential" cmdlet. If you type a user name, you will be prompted for a password. +A warning occurs when you use the AsByteStream parameter with the Encoding parameter. The AsByteStream parameter ignores any encoding and the output is returned as a stream of bytes.`, `SwitchParameter`), + new Parameter(`Credential`, `> [!NOTE] > This parameter is not supported by any providers installed with PowerShell. > To impersonate another user, or elevate your credentials when running this cmdlet, > use Invoke-Command (../Microsoft.PowerShell.Core/Invoke-Command.md).`, `PSCredential`), + new Parameter(`Encoding`, `Specifies the type of encoding for the target file. The default value is UTF8NoBOM . -> [!WARNING] > This parameter is not supported by any providers installed with Windows PowerShell.`, `PSCredential`), - new Parameter(`Encoding`, `Specifies the file encoding. The default is ASCII. +Encoding is a dynamic parameter that the FileSystem provider adds to the "Add-Content" cmdlet. This parameter works only in file system drives. -Valid values are: +The acceptable values for this parameter are as follows: -- ASCII : Uses the encoding for the ASCII (7-bit) character set. - BigEndianUnicode : Encodes in UTF-16 format using the big-endian byte order. - Default : Encodes using the default value: ASCII. - OEM : Uses the default encoding for MS-DOS and console programs. - Byte : Encodes a set of characters into a sequence of bytes. - String : Uses the encoding type for a string. - Unicode : Encodes in UTF-16 format using the little-endian byte order. - UTF7 : Encodes in UTF-7 format. - UTF8 : Encodes in UTF-8 format. - UTF8BOM : Encodes in UTF-8 format with Byte Order Mark (BOM) - UF8NOBOM : Encodes in UTF-8 format without Byte Order Mark (BOM) - UTF32 : Encodes in UTF-32 format. - Unknown : The encoding type is unknown or invalid; the data can be treated as binary. +- ASCII : Uses the encoding for the ASCII (7-bit) character set. - BigEndianUnicode : Encodes in UTF-16 format using the big-endian byte order. - OEM : Uses the default encoding for MS-DOS and console programs. - Unicode : Encodes in UTF-16 format using the little-endian byte order. - UTF7 : Encodes in UTF-7 format. - UTF8 : Encodes in UTF-8 format. - UTF8BOM : Encodes in UTF-8 format with Byte Order Mark (BOM) - UTF8NoBOM : Encodes in UTF-8 format without Byte Order Mark (BOM) - UTF32 : Encodes in UTF-32 format. -Encoding is a dynamic parameter that the FileSystem provider adds to the "Add-Content" cmdlet. This parameter works only in file system drives.`, `Encoding`), - new Parameter(`Exclude`, `Omits the specified items. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as "*.txt". Wildcards are permitted.`, `String[]`), - new Parameter(`Filter`, `Specifies a filter in the provider's format or language. The value of this parameter qualifies the Path parameter. The syntax of the filter, including the use of wildcards, depends on the provider. Filters are more efficient than other parameters, because the provider applies them when retrieving the objects, rather than having PowerShell filter the objects after they are retrieved.`, `String`), +Beginning with PowerShell 6.2, the Encoding parameter also allows numeric IDs of registered code pages (like "-Encoding 1251") or string names of registered code pages (like "-Encoding "windows-1251""). For more information, see the .NET documentation for Encoding.CodePage (/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).`, `Encoding`), + new Parameter(`Exclude`, `Specifies, as a string array, an item or items that this cmdlet excludes in the operation. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as " .txt". Wildcard characters are permitted. The Exclude * parameter is effective only when the command includes the contents of an item, such as "C:\\Windows*", where the wildcard character specifies the contents of the "C\\Windows" directory.`, `String[]`), + new Parameter(`Filter`, `Specifies a filter to qualify the Path parameter. The FileSystem (../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md)provider is the only installed PowerShell provider that supports the use of filters. You can find the syntax for the FileSystem filter language in about_Wildcards (../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved.`, `String`), new Parameter(`Force`, `Overrides the read-only attribute, allowing you to add content to a read-only file. For example, Force will override the read-only attribute or create directories to complete a file path, but it will not attempt to change file permissions.`, `SwitchParameter`), - new Parameter(`Include`, `Adds only the specified items. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as "*.txt". Wildcards are permitted.`, `String[]`), - new Parameter(`LiteralPath`, `Specifies the path to the items that receive the additional content. Unlike Path, the value of LiteralPath is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.`, `String[]`), - new Parameter(`NoNewline`, `Indicates that this cmdlet does not add a new line/carriage return to the content. + new Parameter(`Include`, `Specifies, as a string array, an item or items that this cmdlet includes in the operation. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as "" .txt"". Wildcard characters are permitted. The Include * parameter is effective only when the command includes the contents of an item, such as "C:\\Windows*", where the wildcard character specifies the contents of the "C:\\Windows" directory.`, `String[]`), + new Parameter(`LiteralPath`, `Specifies a path to one or more locations. The value of LiteralPath is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. + + +For more information, see about_Quoting_Rules (../Microsoft.Powershell.Core/About/about_Quoting_Rules.md).`, `String[]`), + new Parameter(`NoNewline`, `Indicates that this cmdlet does not add a new line or carriage return to the content. The string representations of the input objects are concatenated to form the output. No spaces or newlines are inserted between the output strings. No newline is added after the last output string.`, `SwitchParameter`), new Parameter(`PassThru`, `Returns an object representing the added content. By default, this cmdlet does not generate any output.`, `SwitchParameter`), - new Parameter(`Path`, `Specifies the path to the items that receive the additional content. Wildcards are permitted. If you specify multiple paths, use commas to separate the paths.`, `String[]`), - new Parameter(`Stream`, `Specifies an alternative data stream for content. If the stream does not exist, this cmdlet creates it. Wildcard characters are not supported. - - -Stream is a dynamic parameter that the FileSystem provider adds to "Add-Content". This parameter works only in file system drives. + new Parameter(`Path`, `Specifies the path to the items that receive the additional content. Wildcard characters are permitted. The paths must be paths to items, not to containers. For example, you must specify a path to one or more files, not a path to a directory. If you specify multiple paths, use commas to separate the paths.`, `String[]`), + new Parameter(`Stream`, `Specifies an alternative data stream for content. If the stream does not exist, this cmdlet creates it. Wildcard characters are not supported. Stream is a dynamic parameter that the FileSystem provider adds to "Add-Content". This parameter works only in file system drives. You can use the "Add-Content" cmdlet to change the content of the Zone.Identifier alternate data stream. However, we do not recommend this as a way to eliminate security checks that block files that are downloaded from the Internet. If you verify that a downloaded file is safe, use the "Unblock-File" cmdlet. This parameter was introduced in PowerShell 3.0.`, `String`), - new Parameter(`Value`, `Specifies the content to be added. Type a quoted string, such as "This data is for internal use only", or specify an object that contains content, such as the DateTime object that "Get-Date" generates. + new Parameter(`Value`, `Specifies the content to be added. Type a quoted string, such as **This data is for internal use only , or specify an object that contains content, such as the DateTime** object that "Get-Date" generates. -You cannot specify the contents of a file by typing its path, because the path is just a string, but you can use a "Get-Content" command to get the content and pass it to the Value parameter.`, `Object[]`), +You cannot specify the contents of a file by typing its path, because the path is just a string. You can use a "Get-Content" command to get the content and pass it to the Value parameter.`, `Object[]`), new Parameter(`Confirm`, `Prompts you for confirmation before running the cmdlet.`, `SwitchParameter`), new Parameter(`WhatIf`, `Shows what would happen if the cmdlet runs. The cmdlet is not run.`, `SwitchParameter`), - ], `Adds content to the specified items, such as adding words to a file.`, `Add-Content [-Value] [-AsByteStream] [-Credential ] [-Encoding ] [-Exclude ] [-Filter ] [-Force] [-Include ] -LiteralPath [-NoNewline] [-PassThru] [-Stream ] [-Confirm] [-WhatIf] [] + ], `Adds content to the specified items, such as adding words to a file.`, `Add-Content [-Value] [-AsByteStream] [-Credential ] [-Encoding {ASCII | BigEndianUnicode | OEM | Unicode | UTF7 | UTF8 | UTF8BOM | UTF8NoBOM | UTF32}] [-Exclude ] [-Filter ] [-Force] [-Include ] -LiteralPath [-NoNewline] [-PassThru] [-Stream ] [-Confirm] [-WhatIf] [] -Add-Content [-Path] [-Value] [-AsByteStream] [-Credential ] [-Encoding ] [-Exclude ] [-Filter ] [-Force] [-Include ] [-NoNewline] [-PassThru] [-Stream ] [-Confirm] [-WhatIf] []`, "", (parameters, paramDictionary) => { +Add-Content [-Path] [-Value] [-AsByteStream] [-Credential ] [-Encoding {ASCII | BigEndianUnicode | OEM | Unicode | UTF7 | UTF8 | UTF8BOM | UTF8NoBOM | UTF32}] [-Exclude ] [-Filter ] [-Force] [-Include ] [-NoNewline] [-PassThru] [-Stream ] [-Confirm] [-WhatIf] []`, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Add-History`, [ new Parameter(`InputObject`, `Specifies an array of entries to add to the history as HistoryInfo object to the session history. You can use this parameter to submit a HistoryInfo object, such as the ones that are returned by the Get-History , Import-Clixml, or Import-Csv cmdlets, to Add-History .`, `PSObject[]`), @@ -1741,19 +1771,19 @@ Add-Content [-Path] [-Value] [-AsByteStream] [-Credential - ScriptMethod -- CopyMethod +- CodeMethod -For information about these values, see PSMemberTypes Enumeration (https://msdn.microsoft.com/library/system.management.automation.psmembertypes)in the MSDN library. +For information about these values, see PSMemberTypes Enumeration (/dotnet/api/system.management.automation.psmembertypes)in the MSDN library. Not all objects have every type of member. If you specify a member type that the object does not have, PowerShell returns an error.`, `PSMemberTypes`), new Parameter(`Name`, `Specifies the name of the member that this cmdlet adds.`, `String`), new Parameter(`NotePropertyMembers`, `Specifies a hash table or ordered dictionary of note property names and values. Type a hash table or dictionary in which the keys are note property names and the values are note property values. -For more information about hash tables and ordered dictionaries in PowerShell, see about_Hash_Tables. +For more information about hash tables and ordered dictionaries in PowerShell, see about_Hash_Tables (../Microsoft.PowerShell.Core/About/about_Hash_Tables.md). This parameter was introduced in Windows PowerShell 3.0.`, `IDictionary`), @@ -1774,82 +1804,81 @@ This parameter was introduced in Windows PowerShell 3.0.`, `Object`), new Parameter(`PassThru`, `Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. -For most objects, Add-Member adds the new members to the input object. However, when the input object is a string, Add-Member cannot add the member to the input object. For these objects, use the PassThru parameter to create an output object. +For most objects, "Add-Member" adds the new members to the input object. However, when the input object is a string, "Add-Member" cannot add the member to the input object. For these objects, use the PassThru parameter to create an output object. -In Windows PowerShell 2.0, Add-Member added members only to the PSObject wrapper of objects, not to the object. Use the PassThru parameter to create an output object for any object that has a PSObject wrapper.`, `SwitchParameter`), - new Parameter(`SecondValue`, `Specifies optional additional information about AliasProperty , ScriptProperty , CodeProperty , or CodeMethod members. If used when adding an AliasProperty, this parameter must be a data type. A conversion to the specified data type is added to the value of the AliasProperty. For example, if you add an AliasProperty that provides an alternate name for a string property, you can also specify a SecondValue parameter of System.Int32 to indicate that the value of that string property should be converted to an integer when accessed by using the corresponding AliasProperty. +In Windows PowerShell 2.0, "Add-Member" added members only to the PSObject wrapper of objects, not to the object. Use the PassThru parameter to create an output object for any object that has a PSObject wrapper.`, `SwitchParameter`), + new Parameter(`SecondValue`, `Specifies optional additional information about AliasProperty , ScriptProperty , CodeProperty , or CodeMethod members. -You can use the SecondValue parameter to specify an additional ScriptBlock when adding a ScriptProperty member. In that case, the first ScriptBlock, specified in the Value parameter, is used to get the value of a variable. The second ScriptBlock, specified in the SecondValue parameter, is used to set the value of a variable.`, `Object`), +If used when adding an AliasProperty , this parameter must be a data type. A conversion to the specified data type is added to the value of the AliasProperty . + + +For example, if you add an AliasProperty that provides an alternate name for a string property, you can also specify a SecondValue parameter of System.Int32 to indicate that the value of that string property should be converted to an integer when accessed by using the corresponding AliasProperty . + + +You can use the SecondValue parameter to specify an additional ScriptBlock when adding a ScriptProperty member. The first ScriptBlock , specified in the Value parameter, is used to get the value of a variable. The second ScriptBlock , specified in the SecondValue parameter, is used to set the value of a variable.`, `Object`), + new Parameter(`Value`, `Specifies the initial value of the added member. If you add an AliasProperty , CodeProperty , ScriptProperty or CodeMethod member, you can supply optional, additional information by using the SecondValue parameter.`, `Object`), new Parameter(`TypeName`, `Specifies a name for the type. -When the type is a class in the System namespace or a type that has a type accelerator, you can enter the short name of the type. Otherwise, the full type name is required. This parameter is effective only when the input object is a PSObject . +When the type is a class in the System namespace or a type that has a type accelerator, you can enter the short name of the type. Otherwise, the full type name is required. This parameter is effective only when the InputObject is a PSObject . This parameter was introduced in Windows PowerShell 3.0.`, `String`), - new Parameter(`Value`, `Specifies the initial value of the added member. If you add an AliasProperty , CodeProperty , ScriptProperty or CodeMethod member, you can supply optional, additional information by using the SecondValue parameter.`, `Object`), ], `Adds custom properties and methods to an instance of a PowerShell object.`, `Add-Member [-NotePropertyMembers] [-Force] -InputObject [-PassThru] [-TypeName ] [] Add-Member [-NotePropertyName] [-NotePropertyValue] [-Force] -InputObject [-PassThru] [-TypeName ] [] Add-Member [-MemberType] {AliasProperty | CodeProperty | Property | NoteProperty | ScriptProperty | Properties | PropertySet | Method | CodeMethod | ScriptMethod | Methods | ParameterizedProperty | MemberSet | Event | Dynamic | All} [-Name] [[-Value] ] [[-SecondValue] ] [-Force] -InputObject [-PassThru] [-TypeName ] [] -Add-Member -InputObject [-PassThru] -TypeName []`, "", (parameters, paramDictionary) => { +Add-Member -InputObject [-PassThru] [-TypeName ] []`, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Add-Type`, [ - new Parameter(`AssemblyName`, `Specifies the name of an assembly that includes the types. "Add-Type" takes the types from the specified assembly. This parameter is required when you are creating types based on an assembly name. + new Parameter(`AssemblyName`, `Specifies the name of an assembly that includes the types. "Add-Type" takes the types from the specified assembly. This parameter is required when you're creating types based on an assembly name. -Enter the full or simple name (also known as the "partial name") of an assembly. Wildcard characters are permitted in the assembly name. If you enter a simple or partial name, "Add-Type" resolves it to the full name, and then uses the full name to load the assembly. +Enter the full or simple name, also known as the partial name, of an assembly. Wildcard characters are permitted in the assembly name. If you enter a simple or partial name, "Add-Type" resolves it to the full name, and then uses the full name to load the assembly. -This parameter does not accept a path or a file name. To enter the path to the assembly dynamic-link library (DLL) file, use the Path parameter.`, `String[]`), +This parameter doesn't accept a path or a file name. To enter the path to the assembly dynamic-link library (DLL) file, use the Path parameter.`, `String[]`), new Parameter(`CompilerOptions`, `Specifies the options for the source code compiler. These options are sent to the compiler without revision. This parameter allows you to direct the compiler to generate an executable file, embed resources, or set command-line options, such as the "/unsafe" option. -You cannot use the CompilerOptions and ReferencedAssemblies parameters in the same command.`, `String[]`), +You can't use the CompilerOptions and ReferencedAssemblies parameters in the same command.`, `String[]`), new Parameter(`IgnoreWarnings`, `Ignores compiler warnings. Use this parameter to prevent "Add-Type" from handling compiler warnings as errors.`, `SwitchParameter`), - new Parameter(`Language`, `Specifies the language that is used in the source code. The acceptable value for this parameter is CSharp.`, `Language`), - new Parameter(`LiteralPath`, `Specifies the path to source code files or assembly DLL files that contain the types. Unlike Path , the value of the LiteralPath parameter is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.`, `String[]`), + new Parameter(`Language`, `Specifies the language that is used in the source code. The acceptable value for this parameter is CSharp .`, `Language`), + new Parameter(`LiteralPath`, `Specifies the path to source code files or assembly DLL files that contain the types. Unlike Path , the value of the LiteralPath parameter is used exactly as it's typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.`, `String[]`), new Parameter(`MemberDefinition`, `Specifies new properties or methods for the class. "Add-Type" generates the template code that is required to support the properties or methods. -On Windows, you can use this feature to make Platform Invoke (P/Invoke) calls to unmanaged functions in PowerShell. For more information, see the examples.`, `String[]`), +On Windows, you can use this feature to make Platform Invoke (P/Invoke) calls to unmanaged functions in PowerShell.`, `String[]`), new Parameter(`Name`, `Specifies the name of the class to create. This parameter is required when generating a type from a member definition. -The type name and namespace must be unique within a session. You cannot unload a type or change it. If you need to change the code for a type, you must change the name or start a new PowerShell session. Otherwise, the command fails.`, `String`), +The type name and namespace must be unique within a session. You can't unload a type or change it. To change the code for a type, you must change the name or start a new PowerShell session. Otherwise, the command fails.`, `String`), new Parameter(`Namespace`, `Specifies a namespace for the type. -If this parameter is not included in the command, the type is created in the Microsoft.PowerShell.Commands.AddType.AutoGeneratedTypes namespace. If the parameter is included in the command with an empty string value or a value of "$Null", the type is generated in the global namespace.`, `String`), - new Parameter(`OutputAssembly`, `Generates a DLL file for the assembly with the specified name in the location. Enter a path (optional) and file name. Wildcard characters are permitted. By default, "Add-Type" generates the assembly only in memory.`, `String`), - new Parameter(`OutputType`, `Specifies the output type of the output assembly. The acceptable values for this parameter are: +If this parameter isn't included in the command, the type is created in the Microsoft.PowerShell.Commands.AddType.AutoGeneratedTypes namespace. If the parameter is included in the command with an empty string value or a value of "$Null", the type is generated in the global namespace.`, `String`), + new Parameter(`OutputAssembly`, `Generates a DLL file for the assembly with the specified name in the location. Enter an optional path and file name. Wildcard characters are permitted. By default, "Add-Type" generates the assembly only in memory.`, `String`), + new Parameter(`OutputType`, `Specifies the output type of the output assembly. By default, no output type is specified. This parameter is valid only when an output assembly is specified in the command. For more information about the values, see OutputAssemblyType Enumeration (/dotnet/api/microsoft.powershell.commands.outputassemblytype). -- Library +The acceptable values for this parameter are as follows: - ConsoleApplication -- WindowsApplication +- Library - - -For more information about the values, see OutputAssemblyType Enumeration (https://msdn.microsoft.com/library/microsoft.powershell.commands.outputassemblytype)in the MSDN library. - - -By default, no output type is specified. - -This parameter is valid only when an output assembly is specified in the command.`, `OutputAssemblyType`), - new Parameter(`PassThru`, `Returns a System.Runtime object that represents the types that were added. By default, this cmdlet does not generate any output.`, `SwitchParameter`), +- WindowsApplication`, `OutputAssemblyType`), + new Parameter(`PassThru`, `Returns a System.Runtime object that represents the types that were added. By default, this cmdlet doesn't generate any output.`, `SwitchParameter`), new Parameter(`Path`, `Specifies the path to source code files or assembly DLL files that contain the types. @@ -1857,71 +1886,38 @@ If you submit source code files, "Add-Type" compiles the code in the files and c If you submit an assembly file, "Add-Type" takes the types from the assembly. To specify an in-memory assembly or the global assembly cache, use the AssemblyName parameter.`, `String[]`), - new Parameter(`ReferencedAssemblies`, `Specifies the assemblies upon which the type depends. By default, "Add-Type" references System.dll and System.Management.Automation.dll. The assemblies that you specify by using this parameter are referenced in addition to the default assemblies. + new Parameter(`ReferencedAssemblies`, `Specifies the assemblies upon which the type depends. By default, "Add-Type" references "System.dll" and "System.Management.Automation.dll". The assemblies that you specify by using this parameter are referenced in addition to the default assemblies. -You cannot use the CompilerOptions and ReferencedAssemblies parameters in the same command.`, `String[]`), +Beginning in PowerShell 6, ReferencedAssemblies doesn't include the default .NET assemblies. You must include a specific reference to them in the value passed to this parameter. + + +You can't use the CompilerOptions and ReferencedAssemblies parameters in the same command.`, `String[]`), new Parameter(`TypeDefinition`, `Specifies the source code that contains the type definitions. Enter the source code in a string or here-string, or enter a variable that contains the source code. For more information about here-strings, see about_Quoting_Rules (../Microsoft.PowerShell.Core/about/about_Quoting_Rules.md). -Include a namespace declaration in your type definition. If you omit the namespace declaration, your type might have the same name as another type or the shortcut for another type, causing an unintentional overwrite. For example, if you define a type called Exception, scripts that use Exception as the shortcut for System.Exception will fail.`, `String`), - new Parameter(`UsingNamespace`, `Specifies other namespaces that are required for the class. This is much like the Using keyword in C#. +Include a namespace declaration in your type definition. If you omit the namespace declaration, your type might have the same name as another type or the shortcut for another type, causing an unintentional overwrite. For example, if you define a type called Exception , scripts that use Exception as the shortcut for System.Exception will fail.`, `String`), + new Parameter(`UsingNamespace`, `Specifies other namespaces that are required for the class. This is much like the C# keyword, "Using". By default, "Add-Type" references the System namespace. When the MemberDefinition parameter is used, "Add-Type" also references the System.Runtime.InteropServices namespace by default. The namespaces that you add by using the UsingNamespace parameter are referenced in addition to the default namespaces.`, `String[]`), - ], `Adds a Microsoft .NET Core type (a class) to a PowerShell session.`, `Add-Type -AssemblyName [-IgnoreWarnings] [-PassThru] [] + ], `Adds a Microsoft .NET Core class to a PowerShell session.`, `Add-Type -AssemblyName [-IgnoreWarnings] [-PassThru] [] -Add-Type [-TypeDefinition] [-CompilerOptions ] [-IgnoreWarnings] [-Language {CSharp}] [-OutputAssembly ] [-OutputType {Library | ConsoleApplication | WindowsApplication}] [-PassThru] [-ReferencedAssemblies ] [] +Add-Type [-TypeDefinition] [-CompilerOptions ] [-IgnoreWarnings] [-Language {CSharp}] [-OutputAssembly ] [-OutputType {ConsoleApplication | Library | WindowsApplication}] [-PassThru] [-ReferencedAssemblies ] [] -Add-Type [-Name] [-MemberDefinition] [-CompilerOptions ] [-IgnoreWarnings] [-Language {CSharp}] [-Namespace ] [-OutputAssembly ] [-OutputType {Library | ConsoleApplication | WindowsApplication}] [-PassThru] [-ReferencedAssemblies ] [-UsingNamespace ] [] +Add-Type [-Name] [-MemberDefinition] [-CompilerOptions ] [-IgnoreWarnings] [-Language {CSharp}] [-Namespace ] [-OutputAssembly ] [-OutputType {ConsoleApplication | Library | WindowsApplication}] [-PassThru] [-ReferencedAssemblies ] [-UsingNamespace ] [] -Add-Type [-Path] [-CompilerOptions ] [-IgnoreWarnings] [-OutputAssembly ] [-OutputType {Library | ConsoleApplication | WindowsApplication}] [-PassThru] [-ReferencedAssemblies ] [] +Add-Type [-Path] [-CompilerOptions ] [-IgnoreWarnings] [-OutputAssembly ] [-OutputType {ConsoleApplication | Library | WindowsApplication}] [-PassThru] [-ReferencedAssemblies ] [] -Add-Type [-CompilerOptions ] [-IgnoreWarnings] -LiteralPath [-OutputAssembly ] [-OutputType {Library | ConsoleApplication | WindowsApplication}] [-PassThru] [-ReferencedAssemblies ] []`, "", (parameters, paramDictionary) => { +Add-Type [-CompilerOptions ] [-IgnoreWarnings] -LiteralPath [-OutputAssembly ] [-OutputType {ConsoleApplication | Library | WindowsApplication}] [-PassThru] [-ReferencedAssemblies ] []`, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`Add-VMAssignableDevice`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + new ConsoleCommand(`Add-WindowsCapability`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`Add-VMDvdDrive`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + new ConsoleCommand(`Add-WindowsDriver`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`Add-VMFibreChannelHba`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + new ConsoleCommand(`Add-WindowsImage`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`Add-VMGpuPartitionAdapter`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMGroupMember`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMHardDiskDrive`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMHostAssignableDevice`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMKeyStorageDrive`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMMigrationNetwork`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMNetworkAdapter`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMNetworkAdapterAcl`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMNetworkAdapterExtendedAcl`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMNetworkAdapterRoutingDomainMapping`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMPmemController`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMRemoteFx3dVideoAdapter`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMScsiController`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMStoragePath`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMSwitch`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMSwitchExtensionPortFeature`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMSwitchExtensionSwitchFeature`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Add-VMSwitchTeamMember`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Checkpoint-VM`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + new ConsoleCommand(`Add-WindowsPackage`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Clear-Content`, [ new Parameter(`Stream`, `Specifies an alternative data stream for content. If the stream does not exist, this cmdlet creates it. Wildcard characters are not supported. @@ -1931,13 +1927,7 @@ Stream is a dynamic parameter that the FileSystem provider adds to "Clear-Conten You can use the "Clear-Content" cmdlet to change the content of the Zone.Identifier alternate data stream. However, we do not recommend this as a way to eliminate security checks that block files that are downloaded from the Internet. If you verify that a downloaded file is safe, use the "Unblock-File" cmdlet.`, `String`), - new Parameter(`Credential`, `Specifies a user account that has permission to perform this action. The default is the current user. - - -Type a user name, such as "User01" or "Domain01\User01", or enter a PSCredential object, such as one generated by the "Get-Credential" cmdlet. If you type a user name, you will be prompted for a password. - - -> [!WARNING] > This parameter is not supported by any providers installed with Windows PowerShell.`, `PSCredential`), + new Parameter(`Credential`, `> [!NOTE] > This parameter is not supported by any providers installed with PowerShell. To impersonate another > user, or elevate your credentials when running this cmdlet, use Invoke-Command.`, `PSCredential`), new Parameter(`Exclude`, `Specifies, as a string array, strings that this cmdlet omits from the path to the content. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as "*.txt". Wildcards are permitted.`, `String[]`), new Parameter(`Filter`, `Specifies a filter in the provider's format or language. The value of this parameter qualifies the Path parameter. The syntax of the filter, including the use of wildcards, depends on the provider. Filters are more efficient than other parameters, because the provider applies them when retrieving the objects, rather than having PowerShell filter the objects after they are retrieved.`, `String`), new Parameter(`Force`, `Forces the command to run without asking for user confirmation.`, `SwitchParameter`), @@ -1951,42 +1941,39 @@ Type a user name, such as "User01" or "Domain01\User01", or enter a PSCredential Clear-Content [-Path] [-Stream ] [-Credential ] [-Exclude ] [-Filter ] [-Force] [-Include ] [-Confirm] [-WhatIf] []`, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Clear-History`, [ - new Parameter(`CommandLine`, `Specifies commands that this cmdlet deletes. If you enter more than one string, Clear-History deletes commands that have any of the strings.`, `String[]`), - new Parameter(`Count`, `Specifies the number of history entries that this cmdlet clears, starting with the oldest entry in the history. + new Parameter(`CommandLine`, `Deletes command history from a PowerShell session. The string must be an exact match or use wildcards to match commands in the PowerShell session history displayed by "Get-History". If you enter more than one string, "Clear-History" deletes commands that match any of the strings. The CommandLine parameter can be used with Count . -If you use the Count and Id parameters in the same command, the cmdlet clears the number of entries specified by the Count parameter, starting with the entry specified by the Id parameter. For example, if Count is 10 and Id is 30, Clear-History clears items 21 through 30 inclusive. +For strings with a space, use single quotations. For more information, see about_Quoting_Rules (About/about_Quoting_Rules.md).`, `String[]`), + new Parameter(`Count`, `Specifies the number of history entries that "Clear-History" deletes. Commands are deleted in order, beginning with the oldest entry in the history. -If you use the Count and CommandLine parameters in the same command, Clear-History clears the number of entries specified by the Count parameter, starting with the entry specified by the CommandLine parameter.`, `Int32`), - new Parameter(`Id`, `Specifies the history IDs of commands that this cmdlet deletes. +The Count and Id parameters can be used together. The Count parameter specifies the number of commands to delete, inclusive of the specified Id . Beginning at the specified Id , commands are deleted in reverse sequential order. For example, if the Id is 30 and the Count is 10, "Clear-History" deletes items 21 through 30. -To find the history ID of a command, use the Get-History cmdlet.`, `Int32[]`), - new Parameter(`Newest`, `Indicates that this cmdlet deletes the newest entries in the history. By default, Clear-History deletes the oldest entries in the history.`, `SwitchParameter`), - new Parameter(`Confirm`, `Prompts you for confirmation before running the cmdlet.`, `SwitchParameter`), - new Parameter(`WhatIf`, `Shows what would happen if the cmdlet runs. The cmdlet is not run.`, `SwitchParameter`), - ], `Deletes entries from the command history.`, `Clear-History [[-Count] ] [-CommandLine ] [-Newest] [-Confirm] [-WhatIf] [] +The Count and CommandLine parameters can be used together. Count specifies the number of commands to delete that match CommandLine parameter value. The commands are deleted in sequential order.`, `Int`), + new Parameter(`Id`, `Specifies the command history Id that "Clear-History" deletes. To display Id numbers, use the "Get-History" cmdlet. The Id numbers are sequential and commands keep their Id number throughout a PowerShell session. The Id parameter can be used with Count and Newest .`, `Int[]`), + new Parameter(`Newest`, `When the Newest parameter is used, "Clear-History" deletes the newest entries in the history. By default, "Clear-History" deletes the oldest entries in the history. -Clear-History [[-Id] ] [[-Count] ] [-Newest] [-Confirm] [-WhatIf] []`, "", (parameters, paramDictionary) => { + +The Newest parameter can be used with Id and Count . The Count parameter specifies the number of commands to delete, inclusive of the specified Id . Beginning at the specified Id , commands are deleted in sequential order. For example, if the Id is 30 and the Count is 10, "Clear-History" deletes items 30 through 39.`, `SwitchParameter`), + new Parameter(`Confirm`, `Prompts you for confirmation before running the "Clear-History" cmdlet.`, `SwitchParameter`), + new Parameter(`WhatIf`, `Shows what would happen if the "Clear-History" cmdlet runs. The cmdlet is not run.`, `SwitchParameter`), + ], `Deletes entries from the PowerShell command history.`, `Clear-History [[-Count] ] [-CommandLine ] [-Newest] [-Confirm] [-WhatIf] [] + +Clear-History [[-Id] ] [[-Count] ] [-Newest] [-Confirm] [-WhatIf] []`, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Clear-Item`, [ - new Parameter(`Credential`, `Specifies a user account that has permission to perform this action. The default is the current user. - - -Type a user name, such as "User01" or "Domain01\User01", or enter a PSCredential object, such as one generated by the "Get-Credential" cmdlet. If you type a user name, you are prompted for a password. - - -> [!WARNING] > This parameter is not supported by any providers installed with Windows PowerShell.`, `PSCredential`), - new Parameter(`Exclude`, `Specifies, as a string array, items to exclude. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as *.txt. Wildcard characters are permitted.`, `String[]`), - new Parameter(`Filter`, `Specifies a filter in the format or language of the provider. The value of this parameter qualifies the Path parameter. - - -The syntax of the filter, including the use of wildcard characters, depends on the provider. Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved.`, `String`), + new Parameter(`Credential`, `> [!NOTE] > This parameter is not supported by any providers installed with PowerShell. > To impersonate another user, or elevate your credentials when running this cmdlet, > use Invoke-Command (../Microsoft.PowerShell.Core/Invoke-Command.md).`, `PSCredential`), + new Parameter(`Exclude`, `Specifies, as a string array, an item or items that this cmdlet excludes in the operation. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as " .txt". Wildcard characters are permitted. The Exclude * parameter is effective only when the command includes the contents of an item, such as "C:\\Windows*", where the wildcard character specifies the contents of the "C:\\Windows" directory.`, `String[]`), + new Parameter(`Filter`, `Specifies a filter to qualify the Path parameter. The FileSystem (../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md)provider is the only installed PowerShell provider that supports the use of filters. You can find the syntax for the FileSystem filter language in about_Wildcards (../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved.`, `String`), new Parameter(`Force`, `Indicates that the cmdlet clears items that cannot otherwise be changed, such as read- only aliases. The cmdlet cannot clear constants. Implementation varies from provider to provider. For more information, see about_Providers (../Microsoft.PowerShell.Core/About/about_Providers.md). The cmdlet cannot override security restrictions, even when the Force parameter is used.`, `SwitchParameter`), - new Parameter(`Include`, `Specifies, as a string array, items to that this cmdlet clears. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as "*.txt". Wildcard characters are permitted.`, `String[]`), - new Parameter(`LiteralPath`, `Specifies the path to the items being cleared. Unlike the Path parameter, the value of LiteralPath is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.`, `String[]`), - new Parameter(`Path`, `Specifies the path to the items being cleared. Wildcards are permitted. This parameter is required, but the parameter name (Path) is optional.`, `String[]`), + new Parameter(`Include`, `Specifies, as a string array, an item or items that this cmdlet includes in the operation. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as "" .txt"". Wildcard characters are permitted. The Include * parameter is effective only when the command includes the contents of an item, such as "C:\\Windows*", where the wildcard character specifies the contents of the "C:\\Windows" directory.`, `String[]`), + new Parameter(`LiteralPath`, `Specifies a path to one or more locations. The value of LiteralPath is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. + + +For more information, see about_Quoting_Rules (../Microsoft.Powershell.Core/About/about_Quoting_Rules.md).`, `String[]`), + new Parameter(`Path`, `Specifies the path to the items being cleared. Wildcard characters are permitted. This parameter is required, but the parameter name Path is optional.`, `String[]`), new Parameter(`Confirm`, `Prompts you for confirmation before running the cmdlet.`, `SwitchParameter`), new Parameter(`WhatIf`, `Shows what would happen if the cmdlet runs. The cmdlet is not run.`, `SwitchParameter`), ], `Clears the contents of an item, but does not delete the item.`, `Clear-Item [-Credential ] [-Exclude ] [-Filter ] [-Force] [-Include ] -LiteralPath [-Confirm] [-WhatIf] [] @@ -1994,24 +1981,18 @@ The syntax of the filter, including the use of wildcard characters, depends on t Clear-Item [-Path] [-Credential ] [-Exclude ] [-Filter ] [-Force] [-Include ] [-Confirm] [-WhatIf] []`, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Clear-ItemProperty`, [ - new Parameter(`Credential`, `Specifies a user account that has permission to perform this action. The default is the current user. - - -Type a user name, such as "User01" or "Domain01\User01", or enter a PSCredential object, such as one generated by the "Get-Credential" cmdlet. If you type a user name, you are prompted for a password. - - -> [!WARNING] > This parameter is not supported by any providers installed with Windows PowerShell.`, `PSCredential`), - new Parameter(`Exclude`, `Specifies, as a string array, an item or items that this cmdlet excludes. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as "*.txt". Wildcard characters are permitted.`, `String[]`), - new Parameter(`Filter`, `Specifies a filter in the format or language of the provider. The value of this parameter qualifies the Path parameter. - - -The syntax of the filter, including the use of wildcard characters, depends on the provider. Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved.`, `String`), + new Parameter(`Credential`, `> [!NOTE] > This parameter is not supported by any providers installed with PowerShell. > To impersonate another user, or elevate your credentials when running this cmdlet, > use Invoke-Command (../Microsoft.PowerShell.Core/Invoke-Command.md).`, `PSCredential`), + new Parameter(`Exclude`, `Specifies, as a string array, an item or items that this cmdlet excludes in the operation. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as " .txt". Wildcard characters are permitted. The Exclude * parameter is effective only when the command includes the contents of an item, such as "C:\\Windows*", where the wildcard character specifies the contents of the "C:\\Windows" directory.`, `String[]`), + new Parameter(`Filter`, `Specifies a filter to qualify the Path parameter. The FileSystem (../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md)provider is the only installed PowerShell provider that supports the use of filters. You can find the syntax for the FileSystem filter language in about_Wildcards (../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved.`, `String`), new Parameter(`Force`, `Indicates that this cmdlet deletes properties from items that cannot otherwise be accessed by the user. Implementation varies from provider to provider. For more information, see about_Providers (../Microsoft.PowerShell.Core/About/about_Providers.md).`, `SwitchParameter`), - new Parameter(`Include`, `Specifies, as a string array, an item or items that this cmdlet clears. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as *.txt. Wildcards are permitted.`, `String[]`), - new Parameter(`LiteralPath`, `Specifies the path to the property being cleared. Unlike the Path parameter, the value of LiteralPath is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.`, `String[]`), - new Parameter(`Name`, `Specifies the name of the property to be cleared, such as the name of a registry value. Wildcards are not permitted.`, `String`), + new Parameter(`Include`, `Specifies, as a string array, an item or items that this cmdlet includes in the operation. The value of this parameter qualifies the Path parameter. Enter a path element or pattern, such as "" .txt"". Wildcard characters are permitted. The Include * parameter is effective only when the command includes the contents of an item, such as "C:\\Windows*", where the wildcard character specifies the contents of the "C:\\Windows" directory.`, `String[]`), + new Parameter(`LiteralPath`, `Specifies a path to one or more locations. The value of LiteralPath is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. + + +For more information, see about_Quoting_Rules (../Microsoft.Powershell.Core/About/about_Quoting_Rules.md).`, `String[]`), + new Parameter(`Name`, `Specifies the name of the property to be cleared, such as the name of a registry value. Wildcard characters are permitted.`, `String`), new Parameter(`PassThru`, `Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.`, `SwitchParameter`), - new Parameter(`Path`, `Specifies the path to the property being cleared. Wildcards are permitted.`, `String[]`), + new Parameter(`Path`, `Specifies the path to the property being cleared. Wildcard characters are permitted.`, `String[]`), new Parameter(`Confirm`, `Prompts you for confirmation before running the cmdlet.`, `SwitchParameter`), new Parameter(`WhatIf`, `Shows what would happen if the cmdlet runs. The cmdlet is not run.`, `SwitchParameter`), ], `Clears the value of a property but does not delete the property.`, `Clear-ItemProperty [-Name] [-Credential ] [-Exclude ] [-Filter ] [-Force] [-Include ] -LiteralPath [-PassThru] [-Confirm] [-WhatIf] [] @@ -2048,22 +2029,29 @@ You can also use a number relative to the current scope (0 through the number of new Parameter(`WhatIf`, `Shows what would happen if the cmdlet runs. The cmdlet is not run.`, `SwitchParameter`), ], `Deletes the value of a variable.`, `Clear-Variable [-Name] [-Exclude ] [-Force] [-Include ] [-PassThru] [-Scope ] [-Confirm] [-WhatIf] []`, "", (parameters, paramDictionary) => { }), + new ConsoleCommand(`Clear-WindowsCorruptMountPoint`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), new ConsoleCommand(`Compare-Object`, [ new Parameter(`CaseSensitive`, `Indicates that comparisons should be case-sensitive.`, `SwitchParameter`), new Parameter(`Culture`, `Specifies the culture to use for comparisons.`, `String`), new Parameter(`DifferenceObject`, `Specifies the objects that are compared to the reference objects.`, `PSObject[]`), - new Parameter(`ExcludeDifferent`, `Indicates that this cmdlet displays only the characteristics of compared objects that are equal.`, `SwitchParameter`), - new Parameter(`IncludeEqual`, `Indicates that this cmdlet displays characteristics of compared objects that are equal. By default, only characteristics that differ between the reference and difference objects are displayed.`, `SwitchParameter`), - new Parameter(`PassThru`, `When you use the PassThru parameter, "Compare-Object" omits the "PSCustomObject" wrapper around the compared objects and returns the differing objects, unchanged.`, `SwitchParameter`), + new Parameter(`ExcludeDifferent`, `Indicates that this cmdlet displays only the characteristics of compared objects that are equal. The differences between the objects are discarded. + + +Use ExcludeDifferent with IncludeEqual to display only the lines that match between the reference and difference objects. + + +If ExcludeDifferent is specified without IncludeEqual , there's no output.`, `SwitchParameter`), + new Parameter(`IncludeEqual`, `IncludeEqual displays the matches between the reference and difference objects. + + +By default, the output also includes the differences between the reference and difference objects.`, `SwitchParameter`), + new Parameter(`PassThru`, `When you use the PassThru parameter, "Compare-Object" omits the PSCustomObject wrapper around the compared objects and returns the differing objects, unchanged.`, `SwitchParameter`), new Parameter(`Property`, `Specifies an array of properties of the reference and difference objects to compare.`, `Object[]`), new Parameter(`ReferenceObject`, `Specifies an array of objects used as a reference for comparison.`, `PSObject[]`), - new Parameter(`SyncWindow`, `Specifies the number of adjacent objects that this cmdlet inspects while looking for a match in a collection of objects. This cmdlet examines adjacent objects when it does not find the object in the same position in a collection. The default value is "[Int32]::MaxValue", which means that this cmdlet examines the entire object collection.`, `Int32`), + new Parameter(`SyncWindow`, `Specifies the number of adjacent objects that "Compare-Object" inspects while looking for a match in a collection of objects. "Compare-Object" examines adjacent objects when it doesn't find the object in the same position in a collection. The default value is "[Int32]::MaxValue", which means that "Compare-Object" examines the entire object collection.`, `Int32`), ], `Compares two sets of objects.`, `Compare-Object [-ReferenceObject] [-DifferenceObject] [-CaseSensitive] [-Culture ] [-ExcludeDifferent] [-IncludeEqual] [-PassThru] [-Property ] [-SyncWindow ] []`, "", (parameters, paramDictionary) => { }), - new ConsoleCommand(`Compare-VM`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Complete-VMFailover`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), new ConsoleCommand(`Confirm-SecureBootUEFI`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Connect-PSSession`, [ @@ -2127,7 +2115,7 @@ Type the NetBIOS name, an IP address, or a fully qualified domain name of one co new Parameter(`ConfigurationName`, `Connects only to sessions that use the specified session configuration. -Enter a configuration name or the fully qualified resource URI for a session configuration. If you specify only the configuration name, the following schema URI is prepended: http://schemas.microsoft.com/powershell. The configuration name of a session is stored in the ConfigurationName property of the session. +Enter a configuration name or the fully qualified resource URI for a session configuration. If you specify only the configuration name, the following schema URI is prepended: "http://schemas.microsoft.com/powershell". The configuration name of a session is stored in the ConfigurationName property of the session. The value of this parameter is used to select and filter sessions. It does not change the session configuration that the session uses. @@ -2159,7 +2147,13 @@ If the destination computer redirects the connection to a different URI, PowerSh new Parameter(`Credential`, `Specifies a user account that has permission to connect to the disconnected session. The default is the current user. -Type a user name, such as User01 or Domain01\User01. Or, enter a PSCredential object, such as one generated by the Get-Credential cmdlet. If you type a user name, this cmdlet prompts you for a password.`, `PSCredential`), +Type a user name, such as User01 or Domain01\\User01 , or enter a PSCredential object generated by the "Get-Credential" cmdlet. If you type a user name, you're prompted to enter the password. + + +Credentials are stored in a PSCredential (/dotnet/api/system.management.automation.pscredential)object and the password is stored as a SecureString (/dotnet/api/system.security.securestring). + + +> [!NOTE] > For more information about SecureString data protection, see > How secure is SecureString? (/dotnet/api/system.security.securestring#how-secure-is-securestring).`, `PSCredential`), new Parameter(`Id`, `Specifies the IDs of the disconnected sessions. The Id parameter works only when the disconnected session was previously connected to the current session. @@ -2178,10 +2172,10 @@ The instance ID is stored in the InstanceID property of the PSSession .`, `Guid[ Before using an alternate port, you must configure the WinRM listener on the remote computer to listen at that port. To configure the listener, type the following two commands at the PowerShell prompt: -"Remove-Item -Path WSMan:\Localhost\listener\listener* -Recurse" +"Remove-Item -Path WSMan:\\Localhost\\listener\\listener* -Recurse" -"New-Item -Path WSMan:\Localhost\listener -Transport http -Address * -Port " +"New-Item -Path WSMan:\\Localhost\\listener -Transport http -Address * -Port " Do not use the Port parameter unless you must. The port that is set in the command applies to all computers or sessions on which the command runs. An alternate port setting might prevent the command from running on all computers.`, `Int32`), @@ -2221,15 +2215,18 @@ Connect-PSSession [-Id] [-ThrottleLimit ] [-Confirm] [-WhatIf] Connect-PSSession -InstanceId [-ThrottleLimit ] [-Confirm] [-WhatIf] [] -Connect-PSSession -Name [-ThrottleLimit ] [-Confirm] [-WhatIf] [] +Connect-PSSession [-Name ] [-ThrottleLimit ] [-Confirm] [-WhatIf] [] Connect-PSSession [-Session] [-ThrottleLimit ] [-Confirm] [-WhatIf] []`, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Connect-VMNetworkAdapter`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Connect-VMSan`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`Connect-WSMan`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`Convert-Path`, [ + new Parameter(`LiteralPath`, `Specifies, as a string array, the path to be converted. The value of the LiteralPath parameter is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.`, `String[]`), + new Parameter(`Path`, `Specifies the PowerShell path to be converted.`, `String[]`), + ], `Converts a path from a PowerShell path to a PowerShell provider path.`, `Convert-Path -LiteralPath [] + +Convert-Path [-Path] []`, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`ConvertFrom-Csv`, [ new Parameter(`Delimiter`, `Specifies the delimiter that separates the property values in the CSV strings. The default is a comma (,). @@ -2260,46 +2257,77 @@ ConvertFrom-Csv [-InputObject] [-Header ] -UseCulture [ [-AsHashtable] []`, "", (parameters, paramDictionary) => { + ], `Converts a JSON-formatted string to a custom object or a hash table.`, `ConvertFrom-Json [-InputObject] [-AsHashtable] [-Depth ] []`, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`ConvertFrom-Markdown`, [ - new Parameter(`AsVT100EncodedString`, ``, `switch`), - new Parameter(`InputObject`, ``, `psobject`), - new Parameter(`LiteralPath`, ``, `string[]`), - new Parameter(`Path`, ``, `string[]`), - ], `ConvertFrom-Markdown [-Path] [-AsVT100EncodedString] [] + new Parameter(`AsVT100EncodedString`, `Specifies if the output should be encoded as a string with VT100 escape codes.`, `SwitchParameter`), + new Parameter(`InputObject`, `Specifies the object to be converted. When an object of type System.String is specified, the string is converted. When an object of type System.IO.FileInfo is specified, the contents of the file specified by the object are converted. Objects of any other type result in an error.`, `PSObject`), + new Parameter(`LiteralPath`, `Specifies a path to the file to be converted.`, `String[]`), + new Parameter(`Path`, `Specifies a path to the file to be converted.`, `String[]`), + ], `Convert the contents of a string or a file to a MarkdownInfo object.`, `ConvertFrom-Markdown [-AsVT100EncodedString] -InputObject [] -ConvertFrom-Markdown -LiteralPath [-AsVT100EncodedString] [] +ConvertFrom-Markdown [-AsVT100EncodedString] -LiteralPath [] -ConvertFrom-Markdown -InputObject [-AsVT100EncodedString] []`, `syntaxItem ----------- -{@{name=ConvertFrom-Markdown; CommonParameters=True; parameter=System.Object[]}, @{name=ConvertFrom-Markdown; CommonP...`, "", (parameters, paramDictionary) => { +ConvertFrom-Markdown [-Path] [-AsVT100EncodedString] []`, "", (parameters, paramDictionary) => { + }), + new ConsoleCommand(`ConvertFrom-SddlString`, [ + new Parameter(`Sddl`, `Specifies the string representing the security descriptor in SDDL syntax.`, `String`), + new Parameter(`Type`, `Specifies the type of rights that SDDL string represents. + + +The acceptable values for this parameter are: + + +- FileSystemRights + + +- RegistryRights + + +- ActiveDirectoryRights + + +- MutexRights + + +- SemaphoreRights + + +- CryptoKeyRights + + +- EventWaitHandleRights + + + + +By default cmdlet uses file system rights. + +CryptoKeyRights and ActiveDirectoryRights are not supported in PowerShell Core.`, `Object`), + ], `Converts a SDDL string to a custom object.`, `ConvertFrom-SddlString [-Sddl] [-Type {FileSystemRights | RegistryRights | ActiveDirectoryRights | MutexRights | SemaphoreRights | CryptoKeyRights | EventWaitHandleRights}] []`, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`ConvertFrom-SecureString`, [], `See help file for details.`, ``, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`ConvertFrom-StringData`, [ - new Parameter(`StringData`, `Specifies the string to be converted. You can use this parameter or pipe a string to ConvertFrom-StringData . The parameter name is optional. + new Parameter(`StringData`, `Specifies the string to be converted. You can use this parameter or pipe a string to "ConvertFrom-StringData". The parameter name is optional. -The value of this parameter must be a string that is enclosed in single quotation marks, a string that is enclosed in double quotation marks, or a here-string that contains one or more key/value pairs. Each key/value pair must be on a separate line, or each pair must be separated by newline characters ("n). +The value of this parameter must be a string that contains one or more key-value pairs. Each key-value pair must be on a separate line, or each pair must be separated by newline characters ("n). -You can include comments in the string, but the comments cannot be on the same line as a key/value pair. The comments are not included in the hash table. +You can include comments in the string, but the comments cannot be on the same line as a key-value pair. "ConvertFrom-StringData" ignores single-line comments. The "#" character must be the first non-whitespace character on the line. All characters on the line after the "#" are ignored. The comments are not included in the hash table. -A here-string is a string consisting of one or more lines within which quotation marks are interpreted literally. For more information, see about_Quoting_Rules.`, `String`), +A here-string is a string consisting of one or more lines. Quotation marks within the here-string are interpreted literally as part of the string data. For more information, see about_Quoting_Rules (../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md).`, `String`), ], `Converts a string containing one or more key and value pairs to a hash table.`, `ConvertFrom-StringData [-StringData] []`, "", (parameters, paramDictionary) => { - }), - new ConsoleCommand(`Convert-Path`, [ - new Parameter(`LiteralPath`, `Specifies, as a string array, the path to be converted. The value of the LiteralPath parameter is used exactly as it is typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.`, `String[]`), - new Parameter(`Path`, `Specifies the PowerShell path to be converted.`, `String[]`), - ], `Converts a path from a PowerShell path to a PowerShell provider path.`, `Convert-Path -LiteralPath [] - -Convert-Path [-Path] []`, "", (parameters, paramDictionary) => { }), new ConsoleCommand(`ConvertTo-Csv`, [ new Parameter(`Delimiter`, `Specifies the delimiter to separate the property values in CSV strings. The default is a comma (","). Enter a character, such as a colon (":"). To specify a semicolon (";") enclose it in single quotation marks.`, `Char`), @@ -2310,7 +2338,7 @@ This parameter was introduced in PowerShell 6.0.`, `SwitchParameter`), new Parameter(`InputObject`, `Specifies the objects that are converted to CSV strings. Enter a variable that contains the objects or type a command or expression that gets the objects. You can also pipe objects to "ConvertTo-CSV".`, `PSObject`), new Parameter(`NoTypeInformation`, `Removes the #TYPE information header from the output. This parameter became the default in PowerShell 6.0 and is included for backwards compatibility.`, `SwitchParameter`), new Parameter(`UseCulture`, `Uses the list separator for the current culture as the item delimiter. To find the list separator for a culture, use the following command: "(Get-Culture).TextInfo.ListSeparator".`, `SwitchParameter`), - ], `Converts objects into a series of comma-separated value (CSV) strings.`, `ConvertTo-Csv [-InputObject] [[-Delimiter] ] [-IncludeTypeInformation] [-NoTypeInformation] [] + ], `Converts objects into a series of character-separated value (CSV) strings.`, `ConvertTo-Csv [-InputObject] [[-Delimiter] ] [-IncludeTypeInformation] [-NoTypeInformation] [] ConvertTo-Csv [-InputObject] [-IncludeTypeInformation] [-NoTypeInformation] [-UseCulture] []`, "", (parameters, paramDictionary) => { }), @@ -2323,7 +2351,10 @@ The Table value generates an HTML table that resembles the PowerShell table form The List value generates a two-column HTML table for each object that resembles the PowerShell list format. The first column displays the property name; the second column displays the property value.`, `String`), new Parameter(`Body`, `Specifies the text to add after the opening tag. By default, there is no text in that position.`, `String[]`), - new Parameter(`Charset`, `Specifies text to add to the opening tag. By default, there is no text in that position.`, `String`), + new Parameter(`Charset`, `Specifies text to add to the opening tag. By default, there is no text in that position. + + +This parameter was introduced in PowerShell 6.0.`, `String`), new Parameter(`CssUri`, `Specifies the Uniform Resource Identifier (URI) of the cascading style sheet (CSS) that is applied to the HTML file. The URI is included in a style sheet link in the output.`, `Uri`), new Parameter(`Fragment`, `Generates only an HTML table. The HTML, HEAD, TITLE, and BODY tags are omitted.`, `SwitchParameter`), new Parameter(`Head`, `Specifies the content of the tag. The default is HTML TABLE. If you use the Head parameter, the Title parameter is ignored.`, `String[]`), @@ -2331,7 +2362,10 @@ The List value generates a two-column HTML table for each object that resembles If you use this parameter to submit multiple objects, such as all of the services on a computer, ConvertTo-Html creates a table that displays the properties of a collection or of an array of objects ( System.Object []). To create a table of the individual objects, use the pipeline operator to pipe the objects to ConvertTo-Html .`, `PSObject`), - new Parameter(`Meta`, `Specifies text to add to the opening tag. By default, there is no text in that position.`, `Hashtable`), + new Parameter(`Meta`, `Specifies text to add to the opening tag. By default, there is no text in that position. + + +This parameter was introduced in PowerShell 6.0.`, `Hashtable`), new Parameter(`PostContent`, `Specifies text to add after the closing tag. By default, there is no text in that position.`, `String[]`), new Parameter(`PreContent`, `Specifies text to add before the opening tag. By default, there is no text in that position.`, `String[]`), new Parameter(`Property`, `Includes the specified properties of the objects in the HTML. The value of the Property parameter can be a new calculated property. To create a calculated property, use a hash table. Valid keys are: @@ -2342,7 +2376,10 @@ If you use this parameter to submit multiple objects, such as all of the service - Expression or