Service | Microsoft Docs article | Related commit history on GitHub | Change details |
---|---|---|---|
Microsoft.PowerShell.Diagnostics | Get Winevent (5.1) | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md | Get-WinEvent [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCrede The `Get-WinEvent` cmdlet gets events from event logs, including classic logs, such as the **System** and **Application** logs. The cmdlet gets data from event logs that are generated by the-Windows Event Log technology introduced in Windows Vista. And, events in log files generated by +Windows Event Log technology introduced in Windows Vista and events in log files generated by **Event Tracing for Windows (ETW)**. By default, `Get-WinEvent` returns event information in the order of newest to oldest. ProviderControlGuid : ``` The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object is-saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The +saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The **SaveChanges** method is called to push the change to the system inside of a try block to handle access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to the `Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the machine. |
Microsoft.PowerShell.Management | Set Timezone (5.1) | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Set-TimeZone.md | external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management Previously updated : 09/18/2019 Last updated : 03/24/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/set-timezone?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-TimeZone The `Set-TimeZone` cmdlet sets the system time zone to a specified time zone. ### Example 1: Set the time zone by Id -This example sets the time zone on the local computer to Russian Standard Time. +This example sets the time zone on the local computer to UTC. ```powershell-Set-TimeZone -Id "Russian Standard Time" -PassThru +Set-TimeZone -Name 'Coordinated Universal Time' -PassThru ``` ```Output-Id : Russian Standard Time -DisplayName : (UTC+03:00) Moscow, St. Petersburg -StandardName : Russia TZ 2 Standard Time -DaylightName : Russia TZ 2 Daylight Time -BaseUtcOffset : 03:00:00 -SupportsDaylightSavingTime : True +Id : UTC +DisplayName : (UTC) Coordinated Universal Time +StandardName : Coordinated Universal Time +DaylightName : Coordinated Universal Time +BaseUtcOffset : 00:00:00 +SupportsDaylightSavingTime : False ``` ### Example 2: Set the time zone by name -This example sets the time zone on the local computer to Russian Standard Time. +This example sets the time zone on the local computer to UTC. ```powershell-Set-TimeZone -Name "Russia TZ 2 Standard Time" +Set-TimeZone -Name "UTC" ``` As we saw in the previous example, the **Id** and the **Name** of the Time Zone do not always match. |
Microsoft.PowerShell.Diagnostics | Get Winevent (7.0) | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md | Get-WinEvent [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCrede The `Get-WinEvent` cmdlet gets events from event logs, including classic logs, such as the **System** and **Application** logs. The cmdlet gets data from event logs that are generated by the-Windows Event Log technology introduced in Windows Vista. And, events in log files generated by +Windows Event Log technology introduced in Windows Vista and events in log files generated by **Event Tracing for Windows (ETW)**. By default, `Get-WinEvent` returns event information in the order of newest to oldest. ProviderControlGuid : ``` The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object is-saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The +saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The **SaveChanges** method is called to push the change to the system inside of a try block to handle access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to the `Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the machine. |
Microsoft.PowerShell.Management | Set Timezone (7.0) | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Set-TimeZone.md | external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management Previously updated : 09/18/2019 Last updated : 03/24/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/set-timezone?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-TimeZone The `Set-TimeZone` cmdlet sets the system time zone to a specified time zone. ### Example 1: Set the time zone by Id -This example sets the time zone on the local computer to Russian Standard Time. +This example sets the time zone on the local computer to UTC. ```powershell-Set-TimeZone -Id "Russian Standard Time" -PassThru +Set-TimeZone -Name 'Coordinated Universal Time' -PassThru ``` ```Output-Id : Russian Standard Time -DisplayName : (UTC+03:00) Moscow, St. Petersburg -StandardName : Russia TZ 2 Standard Time -DaylightName : Russia TZ 2 Daylight Time -BaseUtcOffset : 03:00:00 -SupportsDaylightSavingTime : True +Id : UTC +DisplayName : (UTC) Coordinated Universal Time +StandardName : Coordinated Universal Time +DaylightName : Coordinated Universal Time +BaseUtcOffset : 00:00:00 +SupportsDaylightSavingTime : False ``` ### Example 2: Set the time zone by name -This example sets the time zone on the local computer to Russian Standard Time. +This example sets the time zone on the local computer to UTC. ```powershell-Set-TimeZone -Name "Russia TZ 2 Standard Time" +Set-TimeZone -Name "UTC" ``` As we saw in the previous example, the **Id** and the **Name** of the Time Zone do not always match. |
Microsoft.PowerShell.Diagnostics | Get Winevent (7.1) | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md | Get-WinEvent [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCrede The `Get-WinEvent` cmdlet gets events from event logs, including classic logs, such as the **System** and **Application** logs. The cmdlet gets data from event logs that are generated by the-Windows Event Log technology introduced in Windows Vista. And, events in log files generated by +Windows Event Log technology introduced in Windows Vista and events in log files generated by **Event Tracing for Windows (ETW)**. By default, `Get-WinEvent` returns event information in the order of newest to oldest. ProviderControlGuid : ``` The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object is-saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The +saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The **SaveChanges** method is called to push the change to the system inside of a try block to handle access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to the `Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the machine. |
Microsoft.PowerShell.Management | Set Timezone (7.1) | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Set-TimeZone.md | external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management Previously updated : 09/18/2019 Last updated : 03/24/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/set-timezone?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-TimeZone The `Set-TimeZone` cmdlet sets the system time zone to a specified time zone. ### Example 1: Set the time zone by Id -This example sets the time zone on the local computer to Russian Standard Time. +This example sets the time zone on the local computer to UTC. ```powershell-Set-TimeZone -Id "Russian Standard Time" -PassThru +Set-TimeZone -Name 'Coordinated Universal Time' -PassThru ``` ```Output-Id : Russian Standard Time -DisplayName : (UTC+03:00) Moscow, St. Petersburg -StandardName : Russia TZ 2 Standard Time -DaylightName : Russia TZ 2 Daylight Time -BaseUtcOffset : 03:00:00 -SupportsDaylightSavingTime : True +Id : UTC +DisplayName : (UTC) Coordinated Universal Time +StandardName : Coordinated Universal Time +DaylightName : Coordinated Universal Time +BaseUtcOffset : 00:00:00 +SupportsDaylightSavingTime : False ``` ### Example 2: Set the time zone by name -This example sets the time zone on the local computer to Russian Standard Time. +This example sets the time zone on the local computer to UTC. ```powershell-Set-TimeZone -Name "Russia TZ 2 Standard Time" +Set-TimeZone -Name "UTC" ``` As we saw in the previous example, the **Id** and the **Name** of the Time Zone do not always match. |
Microsoft.PowerShell.Diagnostics | Get Winevent (7.2) | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md | Get-WinEvent [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCrede The `Get-WinEvent` cmdlet gets events from event logs, including classic logs, such as the **System** and **Application** logs. The cmdlet gets data from event logs that are generated by the-Windows Event Log technology introduced in Windows Vista. And, events in log files generated by +Windows Event Log technology introduced in Windows Vista and events in log files generated by **Event Tracing for Windows (ETW)**. By default, `Get-WinEvent` returns event information in the order of newest to oldest. ProviderControlGuid : ``` The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object is-saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The +saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The **SaveChanges** method is called to push the change to the system inside of a try block to handle access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to the `Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the machine. Environment (Windows PE). [Sort-Object](../Microsoft.PowerShell.Utility/Sort-Object.md) [Where-Object](../Microsoft.PowerShell.Core/Where-Object.md)- |
Microsoft.PowerShell.Management | Set Timezone (7.2) | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Set-TimeZone.md | external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management Previously updated : 09/18/2019 Last updated : 03/24/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/set-timezone?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-TimeZone The `Set-TimeZone` cmdlet sets the system time zone to a specified time zone. ### Example 1: Set the time zone by Id -This example sets the time zone on the local computer to Russian Standard Time. +This example sets the time zone on the local computer to UTC. ```powershell-Set-TimeZone -Id "Russian Standard Time" -PassThru +Set-TimeZone -Name 'Coordinated Universal Time' -PassThru ``` ```Output-Id : Russian Standard Time -DisplayName : (UTC+03:00) Moscow, St. Petersburg -StandardName : Russia TZ 2 Standard Time -DaylightName : Russia TZ 2 Daylight Time -BaseUtcOffset : 03:00:00 -SupportsDaylightSavingTime : True +Id : UTC +HasIanaId : True +DisplayName : (UTC) Coordinated Universal Time +StandardName : Coordinated Universal Time +DaylightName : Coordinated Universal Time +BaseUtcOffset : 00:00:00 +SupportsDaylightSavingTime : False ``` ### Example 2: Set the time zone by name -This example sets the time zone on the local computer to Russian Standard Time. +This example sets the time zone on the local computer to UTC. ```powershell-Set-TimeZone -Name "Russia TZ 2 Standard Time" +Set-TimeZone -Name "UTC" ``` As we saw in the previous example, the **Id** and the **Name** of the Time Zone do not always match. |
Microsoft.PowerShell.Diagnostics | Get Winevent (7.3) | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md | Get-WinEvent [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCrede The `Get-WinEvent` cmdlet gets events from event logs, including classic logs, such as the **System** and **Application** logs. The cmdlet gets data from event logs that are generated by the-Windows Event Log technology introduced in Windows Vista. And, events in log files generated by +Windows Event Log technology introduced in Windows Vista and events in log files generated by **Event Tracing for Windows (ETW)**. By default, `Get-WinEvent` returns event information in the order of newest to oldest. Environment (Windows PE). [Sort-Object](../Microsoft.PowerShell.Utility/Sort-Object.md) [Where-Object](../Microsoft.PowerShell.Core/Where-Object.md)- |
Microsoft.PowerShell.Management | Set Timezone (7.3) | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Set-TimeZone.md | external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management Previously updated : 09/18/2019 Last updated : 03/24/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/set-timezone?view=powershell-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-TimeZone The `Set-TimeZone` cmdlet sets the system time zone to a specified time zone. ### Example 1: Set the time zone by Id -This example sets the time zone on the local computer to Russian Standard Time. +This example sets the time zone on the local computer to UTC. ```powershell-Set-TimeZone -Id "Russian Standard Time" -PassThru +Set-TimeZone -Name 'Coordinated Universal Time' -PassThru ``` ```Output-Id : Russian Standard Time -DisplayName : (UTC+03:00) Moscow, St. Petersburg -StandardName : Russia TZ 2 Standard Time -DaylightName : Russia TZ 2 Daylight Time -BaseUtcOffset : 03:00:00 -SupportsDaylightSavingTime : True +Id : UTC +HasIanaId : True +DisplayName : (UTC) Coordinated Universal Time +StandardName : Coordinated Universal Time +DaylightName : Coordinated Universal Time +BaseUtcOffset : 00:00:00 +SupportsDaylightSavingTime : False ``` ### Example 2: Set the time zone by name -This example sets the time zone on the local computer to Russian Standard Time. +This example sets the time zone on the local computer to UTC. ```powershell-Set-TimeZone -Name "Russia TZ 2 Standard Time" +Set-TimeZone -Name "UTC" ``` As we saw in the previous example, the **Id** and the **Name** of the Time Zone do not always match. |
install | Install Debian | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/docs-conceptual/install/install-debian.md | installing, check the list of [Supported versions](#supported-versions) below. Debian uses APT (Advanced Package Tool) as a package manager. -## Debian 10 --> [!NOTE] -> Debian 10 is only supported in PowerShell 7.0 and newer. - ## Installation via direct download PowerShell 7.2 introduced a universal package that makes installation easier. Download the universal version is: - Debian 10 - `https://github.com/PowerShell/PowerShell/releases/download/v7.0.9/powershell-lts_7.0.9-1.debian.10_amd64.deb` - Debian 9 - `https://github.com/PowerShell/PowerShell/releases/download/v7.0.9/powershell-lts_7.0.9-1.debian.9_amd64.deb` +## Installation on Debian 11 via Package Repository ++PowerShell for Linux is published to package repositories for easy installation and updates. ++The preferred method is as follows: ++```sh +# Install system components +sudo apt update && sudo apt install -y curl gnupg apt-transport-https ++# Import the public repository GPG keys +curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - ++# Register the Microsoft Product feed +sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main" > /etc/apt/sources.list.d/microsoft.list' ++# Install PowerShell +sudo apt update && sudo apt install -y powershell ++# Start PowerShell +pwsh +``` + ## Installation on Debian 10 via Package Repository PowerShell for Linux is published to package repositories for easy installation and updates. |
whats-new | What S New In Powershell 73 | https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-73.md | --- Title: What's New in PowerShell 7.3-preview.1 description: New features and changes released in PowerShell 7.3-preview.1 Previously updated : 03/14/2022 Last updated : 03/24/2022 --- # What's New in PowerShell 7.3 -PowerShell 7.3 is the next preview release, built on .NET 6.0. +PowerShell 7.3 is the next preview release, built on .NET 7.0. -PowerShell 7.3-preview.1 includes the following features, updates, and breaking changes. +PowerShell 7.3-preview.3 includes the following features, updates, and breaking changes. ++Known issues in 7.3-preview.3 ++These issues should be fixed in the next release of .NET 7 ++- `Test-Connection` is broken due to an + [intentional breaking change](https://github.com/dotnet/runtime/issues/66746) in .NET 7. It's + tracked by [#17018](https://github.com/PowerShell/PowerShell/issues/17018) +- `AssemblyName.FullName` has unexpected behavior due to a + [regression](https://github.com/dotnet/runtime/issues/66785) in .NET 7 Improved error handling - Set `$?` correctly for command expression with redirections (#16046) - Fix a casting error when using `$PSNativeCommandUseErrorActionPreference` (#15993) - Make the native command error handling optionally honor `ErrorActionPreference` (#15897)-- Specify the executable path as `TargetObject` for non-zero exit code ErrorRecord (#16108) (Thanks @rkeithhill!)+- Specify the executable path as `TargetObject` for non-zero exit code ErrorRecord (#16108) (Thanks + @rkeithhill!) Tab completion improvements - Fix tab completion within the script block specified for the `ValidateScriptAttribute`. (#14550) (Thanks @MartinGC94!) - Added tab completion for loop labels after `break`/`continue` (#16438) (Thanks @MartinGC94!)+- Improve Hashtable completion in multiple scenarios (#16498) (Thanks @MartinGC94!) + - Parameter splatting + - **Arguments** parameter for `Invoke-CimMethod` + - **FilterHashtable** parameter for `Get-WinEvent` + - **Property** parameter for the CIM cmdlets + - Removes duplicates from member completion scenarios Updated cmdlets Updated cmdlets - Add support to web cmdlets for open-ended input tags (#16193) (Thanks @farmerau!) - Fix `ConvertTo-Json -Depth` to allow 100 at maximum (#16197) (Thanks @KevRitchie!) @rkeithhill!)-- Improve variable handling when calling `Invoke-Command` with the `$using:` expression (#16113) (Thanks @dwtaber!)+- Improve variable handling when calling `Invoke-Command` with the `$using:` expression (#16113) + (Thanks @dwtaber!) - Add `-StrictMode` to `Invoke-Command` to allow specifying strict mode when invoking command locally - Add `clean` block to script block as a peer to `begin`, `process`, and `end` to allow easy resource cleanup (#15177) (#16545) (Thanks @Thomas-Yu!)-- Add `-Options` to the PSRP over SSH commands to allow passing OpenSSH options directly (#12802) (Thanks @BrannenGH!)+- Add `-Options` to the PSRP over SSH commands to allow passing OpenSSH options directly (#12802) + (Thanks @BrannenGH!) For a complete list of changes, see the [Change Log][CHANGELOG] in the GitHub repository. PowerShell 7.3 introduces the following experimental features: - [PSNativeCommandErrorActionPreference][exp-error] - Adds the `$PSNativeCommandUseErrorActionPreference` variable to enable errors produced by native commands to be PowerShell errors.-- [PSAMSIMethodInvocationLogging][exp-amsi] - Extends the data that is sent to AMSI for inspection to- include all invocations of .NET method members. +- [PSAMSIMethodInvocationLogging][exp-amsi] - Extends the data that is sent to AMSI for inspection + to include all invocations of .NET method members. For more information about the Experimental Features, see [Using Experimental Features][exp]. |