The latest updates to WSL bring new enterprise security features, new improvements to WSL distros, and the announcement that RedHat is officially becoming a WSL distro! Check out the table of contents in this post for a quick overview of all the announcements! Red Hat is becoming an official WSL distro Although you can run […]
The post What’s new in the Windows Subsystem for Linux in November 2024 appeared first on Windows Command Line.
]]>The latest updates to WSL bring new enterprise security features, new improvements to WSL distros, and the announcement that RedHat is officially becoming a WSL distro!
Check out the table of contents in this post for a quick overview of all the announcements!
Although you can run any Linux distro in WSL, being an official distro makes it easier for WSL users to install and discover it with actions like wsl --list --online
and wsl --install
. We’re excited to announce that Red Hat will soon be delivering a Red Hat Enterprise Linux WSL distro image in the coming months, and it will be shipped with the new tar based WSL distro architecture (which you can learn more about below). Thank you to the Red Hat team as their feedback has been invaluable as we built out this new architecture, and we’re looking forwards to the release!
“Developers have their preferred platforms for developing applications for multiple operating systems, and WSL is an important platform for many of them. Red Hat is committed to driving greater choice and flexibility for developers, which is why we’re working closely with the Microsoft team to bring Red Hat Enterprise Linux, the largest commercially available open source Linux distribution, to all WSL users.”
-Ron Pacheco, senior director, Red Hat Enterprise Linux Ecosystem, Red Hat
We are releasing a new way to make WSL distros, with a new architecture that backs how WSL distros are packaged and installed. Up until now, you could make a WSL distro by either creating an appx package and distributing it via the Microsoft Store, or by importing a .tar file with wsl –import
. We wanted to improve this by making it possible to create a WSL distro without needing to write Windows code, and for users to more easily install their distros from a file or network share which is common in enterprise scenarios.
When using the prior appx based architecture, you would bring a .tar file and package that inside of a .appxbundle. You would write code on Windows to do user setup and creation, and then distribute via the Microsoft Store.
With the tar based architecture, you can start with the same .tar file (which can be an exported Linux container!) and just edit it to add details to make it a WSL distro. Specifically, you will need to add a /etc/wsl-distribution.conf
file and put in content like this:
[oobe]
defaultName = myDistro
command = /bin/my-distro -welcome
[shortcut]
Icon = /path/to/myicon.ico
These options will describe key distro attributes, like the name of the distro, its icon in Windows, and its out of box experience (OOBE) which is what happens when you run WSL for the first time. You’ll notice that the oobe_command
option points to a file which is a Linux executable, meaning you can set up your full experience just in Linux if you wish. As well since this is WSL, you could even run Windows executables for your out of box experiences! You could then rename this tar file to a .wsl
file or .tar.wsl
and then distribute it personally, or integrate it with wsl --install
.
You can learn more about the tar based architecture here at our docs.
This new architecture will add some new requested features for WSL users as well. Specifically, you’ll be able to:
wsl --install
options --name
and --location
(Now you can install straight to your other hard drives!)And here is a quick Q&A for other questions around these changes:
WSL has 2 new feature updates to enhance enterprise security with improved integrations in Intune and Entra ID!
The first feature is Intune device compliance integration with WSL is now generally available! This feature provides IT administrators the ability to enforce selective WSL distribution and version usage in their enterprise with conditional access. This enhances organizations’ security posture by enabling IT administrators to gain greater visibility into Linux distributions and versions running on managed Windows devices. WSL compliance status is now included when evaluating overall compliance of a Windows device that has both Windows and WSL compliance settings configured. In addition, users are presented with the familiar guided noncompliance remediation experience in Company Portal when noncompliant WSL instances are detected. You can learn more about how to get started with this feature at the Intune docs.
The second feature is that Microsoft Entra ID integration with WSL is now available for private preview! It provides a zero-trust experience while accessing protected enterprise resources from within a WSL distribution. It does this by adding better security around passing Entra tokens (so they don’t get passed via networking packets), and automatic connection for Linux processes to use the underlying Windows authentication. Please see this link to sign up for the private preview today and stay tuned for more updates on this feature!
WSL continues to be a highly integrated product with Windows, which works great with other Microsoft experiences. We recommend checking out the Microsoft Dev Box blog post as well to see their latest updates!
One piece of feedback that we’ve heard from new users who are using Linux for the first time in WSL is that they would want to know how to use it and what features are available. We’re aiming to address this concern with a new getting started experience in WSL. Now when a user installs and runs their first WSL distribution, they will see their distro install terminal window, as well as a window explaining what WSL is and its key features!
Each navigation item gives a short explanation of the feature, and deeper links to the docs for users to learn more. We’re hoping to hear your feedback on the content and this experience, and aim to keep improving it in the future! You can try this out by installing the latest WSL preview release 2.4.4 and then running the ‘WSL Settings’ app and clicking the ‘Getting Started’ experience.
As always we’re grateful for the awesome WSL community, and want to hear about your feedback and questions. Please check out the links below to connect with us, and happy coding!
Happy coding!
The post What’s new in the Windows Subsystem for Linux in November 2024 appeared first on Windows Command Line.
]]>GitHub Copilot users can now use the power of GitHub Copilot to get command suggestions and explanations without leaving the terminal with Terminal Chat in Windows Terminal Canary 🚀 This is available for all GitHub Copilot Individual, Business, and Enterprise customers. To get started, sign up for a GitHub Copilot free trial and check out […]
The post GitHub Copilot in Windows Terminal appeared first on Windows Command Line.
]]>GitHub Copilot users can now use the power of GitHub Copilot to get command suggestions and explanations without leaving the terminal with Terminal Chat in Windows Terminal Canary
This is available for all GitHub Copilot Individual, Business, and Enterprise customers. To get started, sign up for a GitHub Copilot free trial and check out the GitHub Copilot quickstart guide.
GitHub Copilot is an AI coding assistant that helps you write code faster and with less effort, allowing you to focus more energy on problem solving and collaboration.
GitHub Copilot has been proven to increase developer productivity and accelerate the pace of software development. For more information, see “Research: quantifying GitHub Copilot’s impact on developer productivity and happiness” in the GitHub blog.
Terminal Chat is a feature in Windows Terminal Canary that allows the user to chat with an AI service (like GitHub Copilot ) to get intelligent suggestions in the context of their terminal.
This feature does not ship with its own large-language model and can also be managed by Group Policy. See “Group Policies for Windows Terminal” for more information.
Connecting GitHub Copilot in Terminal Chat allows you to get command suggestions and explanations without leaving the terminal. This is available for all GitHub Copilot Individual, Business, and Enterprise customers.
If you have access to GitHub Copilot via your organization, you won’t be able to use GitHub Copilot if your organization owner has disabled GitHub Copilot in the CLI. See “Managing policies for Copilot in your organization.”
After this, you will be able to use GitHub Copilot in Terminal Chat!
In the GIF above, you will see an end-to-end demo of the authorization flow and how to use Terminal Chat. You’ll also notice that Terminal Chat transformed into a GitHub Copilot branded experience after signing into GitHub!
Clicking on Terminal Chat’s suggestion will copy it to the input line of your terminal. Terminal Chat will not run the suggestion automatically for you– This way, you will have time to reason over the command before executing it
Terminal Chat only communicates to GitHub Copilot when the user sends a message. The chat history and name of the user’s active shell is also appended to the message sent to GitHub Copilot. For more information on how to use GitHub Copilot responsibly with Windows Terminal, see Responsible use of GitHub Copilot in Windows Terminal.
Here are several ways that you can use GitHub Copilot in Terminal Chat!
Command suggestions: Ask for a command that you would like to use. Terminal Chat also adds name of the active shell to the prompt that you send to GitHub Copilot. This helps us get answers tailored to the shell that is in use– This means we don’t have to specify if we want answers for CMD or PowerShell (Yay! Less typing!)
Translate commands: Terminal Chat can also be used to “translate” commands. For example, you can ask “What’s touch in PowerShell?” or “How do I touch in PowerShell?” to get the suggestion of New-Item
, a PowerShell command that is equivalent to the Linux / Unix-based touch
command for creating a new file
Explain an error: If you’ve received an unfamiliar error response in your command line, you can ask Terminal Chat for an explanation and how to fix it. For example, “What is Error: getaddrinfo ENOTFOUND and how do I fix it?”
Send code suggestions to command-line text editors: If you’re using a command-line text editor in WSL (like nano
or vi
), you can ask Terminal Chat to generate code and send the code suggestion to the editor by clicking the “Copy” button. See the GIF below for a demo!
For now, Terminal Chat is only available in Windows Terminal Canary. We are committed to transparency and listening to user feedback. We strongly believe that the inclusion of the open-source community will help us define the roadmap for our core product, Windows Terminal.
If you are interested in the AI experiences that we are building, then check out the feature/llm
branch of the Windows Terminal repository or download the latest build of Windows Terminal Canary.
If you have a feature request or found a bug, then please submit a new Issue on our GitHub repository. Send us feedback! Help us grow! And let’s build together!
If you need to set Group Policies for Terminal Chat, see our Group Policy documentation.
Lastly, if you want to explore the other features you get with a GitHub Copilot subscription (which includes GitHub Copilot in Visual Studio Code and Visual Studio!) then check out the GitHub Copilot website for more info!
Thank you!
The post GitHub Copilot in Windows Terminal appeared first on Windows Command Line.
]]>Hello friends, we have a new Windows Terminal Preview release! Windows Terminal Preview 1.22 is a large release that contains new features such as Sixel image support (a LARGE community contribution!), Grapheme Cluster Support, the Snippets Pane, Quick Fixes in CMD, and a new Cooked Read popup in CMD to name a few! We are […]
The post Windows Terminal Preview 1.22 Release appeared first on Windows Command Line.
]]>Hello friends, we have a new Windows Terminal Preview release! Windows Terminal Preview 1.22 is a large release that contains new features such as Sixel image support (a LARGE community contribution!), Grapheme Cluster Support, the Snippets Pane, Quick Fixes in CMD, and a new Cooked Read popup in CMD to name a few!
We are also updating Windows Terminal stable to version 1.21 which will include all of the features from this previous blog post. For those that use Input Method Editor (IME), you will notice that we have improved our IME integration in Windows Terminal 1.21. We strive to make a globally-conscious product, so we’d love to hear your feedback! 皆さん、ぜひ新しい IME Integration をお試しください!
You can install Windows Terminal and Windows Terminal Preview from the Microsoft Store, from the GitHub releases page, or by using winget. If you are interested in our bleeding edge features, you can also download Windows Terminal Canary from our GitHub repo.
Now let’s talk about Windows Terminal Preview 1.22!
Sixel image support has been one of our top feature requests in the Windows Terminal repository. Thanks to the help of @j4james, our amazing community member, we were able to make this request a reality.
To display Sixels in Windows Terminal, you will need a tool to encode sixels like libsixel or chafa. For the sake of this blog, I will be using libsixel, which contains img2sixel
.
In this first example, I used img2sixel
to display my .png as a sixel in Windows Terminal.
This sixel image support also provides a way to display image output without having to open up another window.
In this second example, I piped my matplotlib
plot into img2sixel
which allowed the output to be displayed in my active terminal window (as opposed to a new window.)
Have you ever entered an emoji in your terminal and saw your cursor move forward a few more spaces than you expected? No more! We’re now finally joining the ranks of other terminal emulators in supporting grapheme clusters!
With grapheme clusters, a program can use multiple code points to express a single user-perceived character. For instance, the polar bear emoji “” is the combination of a bear face “” and a snowflake “”, glued together with a zero-width joiner. Older versions of Windows Terminal would not understand this and treat them as individual emojis. Depending on the text renderer you would then either see “ ” or “ ” instead of the correct “”
Grapheme clusters doesn’t only help display emojis but other characters as well, like combining diacritical marks.
For those needing compatibility with UNIX based applications that don’t support grapheme clusters yet, we’ve also added support for their “wcswidth” based measurement.
Have you ever woken up at 3:00 AM after getting paged for a SEV1 and frantically struggled to remember what commands you need to revive a production cluster? Well, maybe the Snippets Pane can help with that…
Snippets are commands that you can save in your settings.json
file. The Snippets Pane is our new UI surface for you to see all your Snippets and send them to your command line.
To add a Snippet to your settings.json
file, you will need to add a new object that contains a command
and a name
in the actions
object similar to this:
"actions":
[
{
"command":
{
"action": "sendInput",
"input": "git checkout -b"
},
"name": "git new branch"
}
]
In this object, command
contains an action
and an input
. action
should always be set to sendInput
and input
should be the command that you want to send. Lastly, you will want set name
to the name of your Snippet.
After you have created a Snippet, you will be able to see it in the Snippets Pane. You can invoke the Snippets Pane by searching for it in the Command Palette and clicking on the “Open snippets pane” option (you can also assign this as a keybinding action in the Settings > Action as well.)
To see the command, click on the name of the Snippet. To send the command to your command line, click on the “play” button next to the command.
If you have no idea about what Snippets to add to the Snippets Pane or stuck on writing your first few Snippets, then @zadjii-msft wrote a handy script for you to use to help you populate some Snippets from Commands.dev.
Fans of the Suggestions UI completion menu will also notice that their Snippets will show up as Suggestions in the Suggestions UI! (We’ve also updated the Suggestions UI to display the description
property!)
For all you CMD lovers, Windows Terminal has a new feature called Quick Fix. Now, whenever you enter an unrecognized command in CMD and that command is affliated with an existing WinGet package, you will see a Quick Fix appear on the left side of your terminal window.
Double-clicking on the Quick Fix will recommend you a winget install
command to install the package that you are missing to run that command.
Similar to the Microsoft.WinGet.CommandNotFound PowerShell module, Quick Fixes in CMD is meant to give you assistance in the terminal without having you leave the context of your terminal.
We have also changed the Cooked Read popup UI (used for F7 and friends) in CMD. It now draws beneath the prompt (pushing the screen up) and has a modern TUI scrollbar.
This 1.22 Preview release also replaces the old console hosting subsystem (ConPTY v1) with a completely new one that promises higher fidelity for VT applications, 2x the I/O speed for VT heavy workloads (SGR), up to 16x the I/O speed for plaintext workloads, more reliability, better resizing and reflow, and more! It’s light years ahead of where we were, and serves as the basis for many other improvements.
Please, please, please let us know if you run into any weird console application issues. We’ve tried fan favorites like Far Manager, Z*TREE GOLD, Yori, and more in our quest to make sure it is a great experience for all our users
Actions now have their own IDs, and key bindings just point at them; we’ve made changes to how this works to improve the action and binding experience in future versions
Actions like splitPane
, sendInput: someinput
, and quit
can now be added directly to the New Tab dropdown menu
Snippets can now be saved directly from the command line with the wt x-save
(thanks @e82eric!)
Ctrl+Shift+. will now open the Suggestions UI which contains Snippets and Suggestions. You can now also bind the quickFix
action to open a menu containing only WinGet suggestions (as of today, on Windows 24H2)
You can now search with regular expressions in Terminal (and conhost!)
Command/input previews will now display in line with the cursor, in italic, in the right font… Which you can display in RGB with the fun {profile}.experimental.rainbowSuggestions
setting (boolean, default false
)
Pixel shader authors rejoice! If your shader fails to compile, you’ll now get a useful error message! (thank you @blitzRahul!)
Vintage console applications will no longer get corrupted responses from ReadConsoleOutput when Raster Fonts are enabled
We have brought the new Windows 24H2 API out to the ConPTY NuGet package
We have enabled “automatically mark prompts” (for shell integration) by default
We now track and log changes to settings. To see these code changes, please see pull request #17678
We now log action dispatch occurrences. To see these code changes, please see pull request #17718
We’ve rewritten how selection colors work! They will now be drawn with appropriate contrast, at the exact color you specify, with a foreground that is black or white (whichever is most visible!)
The search box will no longer cover up search results in the top right unless there’s nowhere to scroll (thanks again @e82eric!)
Terminal now comes with shiny new icons for the Visual Studio Developer Shells!
We have restored the …s in some command palette names to help users find them
The command palette has lost some extraneous animations, so it should feel much faster
You can now configure the theme for the Settings UI separately from the application with {theme}.settings.theme
(enum light
, dark
, system
; default: system
) (thanks @bundagaard!)
You can now configure the “Answerback” message sent in response to ENQ using the profile setting answerbackMessage
(string, default: null
) (conhost users: HKCU\Console AnswerbackMessage REG_SZ
) (thanks @j4james!)
We now support the DEC VT paging operations, NP
PP
PPA
PPR
and PPB
, as well as DECPCCM
(page cursor coupling mode) and DECRQDE
(request displayed extent) (thanks again @j4james!)
Applications can now request the entire color palette using DECRQTSR
DECCTR
(CSI 1 ; Pt $ u
) (thanks yet again @j4james!)
Applications can now query the cursor shape set with DECSCUSR
using DECRQSS
(DCS $ q SP q ST
) (thank you again @j4james!)
Applications can now query the size of character cells (CSI 16 t
) and the entire text area (CSI 14 t
), with a response measured in pixels (thanks to @j4james!)
Applications can now query the color palette with OSC 4 ?
, and the default foreground (OSC 10 ?
), background (OSC 11 ?
), cursor (OSC 12 ?
) and selection colors (OSC 17 ?
)
Applications can now change the selection color using OSC 17
Reports generated in response to VT requests are once again given priority over other input
ConPTY: responses longer than 4kb will no longer be corrupted (thanks @j4james!)
Terminal will now more reliably save your session when your computer reboots to update
Background colors will no longer bleed over the edges of the screen when D2D is in use (such as over RDP to a VM)
Curly underlines will now render properly on double-width DECDWL
and double-height DECDHL
lines
Cursor invalidation once again works properly on double-width or double-height lines (thank you @j4james!)
Cursor movement over ConPTY now works properly on double-width or double-height lines (thanks again @j4james!)
The rendering of curly underlines has been improved (special thanks to @smprather for reporting this bug!)
The Suggestions UI will no longer try to grab the PowerShell “ghost text” out of your input line
You can once again cancel overwriting a key binding in the Settings UI
You can once again disable the detection of URLs
You can once again use Ctrl+D and Enter in a disconnected pane
Scrolling the screen will now result in less GPU traffic
Terminal now makes fewer copies (and heap allocations) when writing input to the console app
AtlasEngine will no longer over-read a memory buffer when setting up a GPU texture
Closing a window when you have an unfocusedAppearance
set will no longer result in unscheduled disassembly of your terminal
Session restoration now works more reliably when the entire scrollback is full
We’ve made some improvements to how we handle movement across rectangles for copy operations
Windows Terminal 1.22 Preview is packed with lots of updates. For a full list of changes and which versions of Windows Terminal those changes were backported to, please visit our Discussions page on the Windows Terminal GitHub repository for more information.
We love working with the community and recognizing those who made an impact for each release. Here are the community members who helped out for this one!
We would also like to give a special thanks to @abhijeeth-babu, @jbyuki, and @thadguidry, for their help on our documentation efforts!
We hope you enjoy this release of Windows Terminal 1.22 Preview! This is a rather large preview release so it will take some time for these features to eventually move onto Windows Terminal stable.
More information on these new features can be found on our docs site and if you find any bugs or have feature requests, feel free to file them on GitHub.
If you have any questions you can reach out to Christopher Nguyen (@nguyen_dows) on X (formerly Twitter.)
Thank you!
The post Windows Terminal Preview 1.22 Release appeared first on Windows Command Line.
]]>For this year’s Microsoft BUILD conference, we are thrilled to announce significant updates to WSL. This blog post will provide an overview of these enhancements and the recent developments in WSL. Memory, storage and networking improvements WSL Settings GUI application coming soon WSL Zero Trust Manage WSL in Dev Home, coming soon! Bonus improvements in […]
The post What’s new in the Windows Subsystem for Linux in May 2024 appeared first on Windows Command Line.
]]>For this year’s Microsoft BUILD conference, we are thrilled to announce significant updates to WSL. This blog post will provide an overview of these enhancements and the recent developments in WSL.
We announced several improvements back in September as experimental features and have since been moving these features from experimental to the default settings.
The latest pre-release version of WSL contains improvements to fundamentals of WSL, including:
autoMemoryReclaim=dropCache
Experimental features include: – wsl --manage <distro> --set-sparse <true/false>
to enable automatic disk space reclaim. – wslconfig setting of networkingMode=mirrored
support to try the new mirrored networking mode, which adds new features like IPv6 support.
To better help you customize, manage, and view the settings available in WSL, a WSL Settings GUI application is coming soon!
In the past, you would need to edit the contents of WSL’s .wslconfig
file to control WSL settings. The Linux-style .wslconfig file, text-based approach works well for specific targeted changes. However, it can be difficult to know exactly what settings and input values are available to use in this text-based approach. The WSL Settings app addresses this by breaking out WSL settings into labeled categories, and indicating which ones are available on your machine.
The best part is that the WSL Settings app is compatible with the .wslconfig
text file, meaning that your existing settings will still be respected, and you can edit settings with the GUI app, a text editor, or both as you wish!
Please stay tuned for a new WSL version with this feature.
WSL is built on the principles of zero trust, and we’re proud to demonstrate that by announcing new features and support for enterprises using WSL.
First, Microsoft Defender for Endpoint’s WSL 2 support is now out of public preview and is generally available! You can view the plugin for WSL docs page here to learn more about using Microsoft Defender for Endpoint to monitor your WSL environment.
Secondly, further Intune features are coming to WSL with Linux Intune agent integration. As of today you can manage WSL settings via Intune, and we’re expanding this by also allowing you to enforce conditional access scenarios based on the state of the Linux distro itself. This is available today as a public preview, which first ships with the ability to determine compliance on WSL distro names and versions using custom scripting. In the future we aim to improve this by allowing you to build your own custom Linux scripts for compliance. To learn more and start using the public preview please see this doc page
Lastly , Microsoft Entra Id will also provide integration with WSL, starting with a public preview in the July and August timeframe. As a user this means that Microsoft’s Authentication Library (MSAL) will be able to communicate with WSL in a secure way, letting you automatically log in using your Entra Id credentials on Windows from experiences in WSL like git, or using Microsoft Edge. For enterprise admins this improves security by providing a secure channel to acquire and utilize tokens bound to the host device. We’ll be sure to post any news on the public preview, so stay tuned!
Dev Home has a new ‘Environments’ feature, which lets you manage, launch, and create new development environments like Hyper-V machines, dev boxes and more. WSL is part of this story, as you will be able to also interact with WSL distros in this surface!
This work has been contributed by WSL community member: Carlos Ramirez from Whitewater Foundry, and we’d like to thank him for his awesome contributions! It was created following the extension interface provided by Dev Home environments. You can view the work-in-progress source code here. Whitewater Foundry has other WSL-based products and features, such as Pengwin, a WSL distro with Windows integrations, and Raft WSL, a program to manage WSL with some additional features like snapshotting your WSL distro state.
If you’d like to try this feature today, download the initial build of the WSL Dev Home extension from Whitewater Foundry’s WSL extension Github repo and install the MSIX. We are working on integrating this extension into Dev Home… stay tuned!
For us Linux on Windows fans, there are also other areas of the OS that are getting new and interesting improvements that are available now:
sudo
command in Windows and elevate specific commands. We are hugely thankful to our awesome community for supporting WSL and its related efforts. For technical issues on WSL, please file them at the WSL GitHub repo, and for general questions please don’t be afraid to reach out on X at craigaloewen. For more BUILD announcements check out this blog post. Thank you and happy coding!
The post What’s new in the Windows Subsystem for Linux in May 2024 appeared first on Windows Command Line.
]]>We are pleased to announce the release of WinGet.CommandNotFound! This PowerShell module is a feedback provider plugin for PowerShell that leverages the Windows Package Manager to provide suggestions for packages to install when a native command cannot be found. The command-line predictor feature in PowerShell enables this module to display WinGet packages as predictive suggestions. […]
The post WinGet.CommandNotFound appeared first on Windows Command Line.
]]>We are pleased to announce the release of WinGet.CommandNotFound
! This PowerShell module is a feedback provider plugin for PowerShell that leverages the Windows Package Manager to provide suggestions for packages to install when a native command cannot be found. The command-line predictor feature in PowerShell enables this module to display WinGet packages as predictive suggestions.
This module was originally incubated as a utility in PowerToys. Thanks to the help of the PowerShell and PowerToys community, we got lots of positive feedback to turn this PowerToys utility into a real PowerShell module!
The Microsoft.WinGet.CommandNotFound
module is built on the IFeedbackProvider
interface, which is available with PowerShell 7.4.0-preview.2 or above. To display prediction suggestions, you need PSReadLine 2.2.6 or above.
You will also need Microsoft.WinGet.Client
version 1.8.1133 or higher to receive suggestions.
If PSFeedbackProvider
and PSCommandNotFoundSuggestion
are not yet enabled, then you can run the following commands in PowerShell:
Enable-ExperimentalFeature PSFeedbackProvider
Enable-ExperimentalFeature PSCommandNotFoundSuggestion
You will only need to run these commands once and they will enable PSFeedbackProvider
and PSCommandNotFoundSuggestion
in your next session.
To install the WinGet CommandNotFound module, enter the following in PowerShell 7.4+:
Install-PSResource -Name Microsoft.WinGet.CommandNotFound
To load this module whenever a PowerShell session loads, you will need to add the following to your PowerShell profile:
Import-Module Microsoft.WinGet.CommandNotFound
You can enter code $profile
or notepad $profile
in PowerShell to open up your PowerShell profile in Visual Studio Code or Notepad respectively.
We would like to give a huge thanks to everyone that helped us incubate this feature in PowerToys and the PowerShell team for helping us push this to the PowerShell Gallery.
This module is also open-source so if you find any bugs or have an idea for a feature suggestion, then please visit https://github.com/microsoft/winget-command-not-found
The post WinGet.CommandNotFound appeared first on Windows Command Line.
]]>Windows Terminal is back with another preview release! Windows Terminal Preview 1.21 introduces long-awaited features like Buffer Restore and fontfall back as well as new experimental features like Scratchpad and the ability to load up an image as a texture. There’s also a LOT MORE stuff so check out the rest of this blog post […]
The post Windows Terminal Preview 1.21 Release appeared first on Windows Command Line.
]]>Windows Terminal is back with another preview release! Windows Terminal Preview 1.21 introduces long-awaited features like Buffer Restore and fontfall back as well as new experimental features like Scratchpad and the ability to load up an image as a texture. There’s also a LOT MORE stuff so check out the rest of this blog post to learn more!
We are also updating Windows Terminal stable to version 1.20 which will include all of the features from this previous blog post. You can install Windows Terminal and Windows Terminal Preview from the Microsoft Store, from the GitHub releases page, or by using winget.
If you are interested in our bleeding edge features, you can also download Windows Terminal Canary from our GitHub repo.
Now let’s learn more about Windows Terminal Preview 1.21!
Windows Terminal can now remember the contents of the screen and restore them on startup. To enable this, you will have to select “Open windows from a previous session” in your Startup settings.
Buffer snapshots are stored in Virtual Terminal-encoded text within your package’s local state directory. This directory is typically secured to your user account. Please be aware of these implications if you plan to enable this feature while using a portable distribution of Windows Terminal.
The font face setting in your profiles’s appearance settings now support multiple fonts and you can use commas to list them out. Glyphs which are not found in your first font will be sought in all later fonts.
Below is an example of my PowerShell profile’s font face setting supporting Cascadia Mono NF and MS Gothic:
Speaking of fonts, we have added new settings to allow you to customize the OpenType Features and Axes of your font stack. We have also added settings to allow you to toggle whether you want to use built-in glyphs or full-color emojis (this one is my personal favorite )
Here is what emojis look like with the full-color emoji setting turned off:
Speaking of settings, we have also added four new settings to the Settings UI in your profiles’s advanced settings. These are settings that enable the right-click context menu, display scrollbar marks (which are now pretty stable!), automatically mark prompts, and allow you to reposition the cursor with mouse clicks (experimental.)
In the past, these settings could have only been adjusted via the settings.json
file but now they can also be adjusted in the Settings UI
If you look at the Rendering settings of Windows Terminal Preview, you might notice a few changes. Now that AtlasEngine is the default text rendering engine for Windows Terminal, we have removed the old DxEngine from Windows Terminal.
We have also added some new settings to let you control the behavior of the AtlasEngine via a setting that allows you to select the Graphics API and a setting to disable partial Swap Chain invalidation.
With the AtlasEngine, Windows Terminal can now render pixel-perfect block elements, box-drawing characters, PowerLine symbols, and high-fidelity textured shade glyphs.
This is enabled by default but you can turn it off by disabling “Built-in Glyphs” in the Settings UI (or by going to your settings.json
file and setting {profile}.font.builtinGlyphs to false
)
We have rewritten our Input Method Editor (IME) integration from the ground up. This new rewrite properly blends into TUI applications by adopting their foreground and background colors. We also now use double underlines, wavy lines, and dashed lines to convey more information than ever before in more languages. Oh, and you can finally move the clause cursor during a composition
The image below is an example of our IME integration in action:
Here is an example of our IME integration blending into a TUI application like FAR Manager:
Our JSON Fragment Extensions now support Custom Actions. Here is an example of a Custom Action that you can call.
{
"schemes": [
{
"name": "Dracula",
"black": "#000000",
"red": "#ff5555",
"green": "#50fa7b",
"yellow": "#f1fa8c",
"blue": "#bd93f9",
"purple": "#ff79c6",
"cyan": "#8be9fd",
"white": "#bbbbbb",
"brightBlack": "#555555",
"brightRed": "#ff5555",
"brightGreen": "#50fa7b",
"brightYellow": "#f1fa8c",
"brightBlue": "#bd93f9",
"brightPurple": "#ff79c6",
"brightCyan": "#8be9fd",
"brightWhite": "#ffffff",
"background": "#1e1f29",
"foreground": "#f8f8f2",
"selectionBackground": "#44475a",
"cursorColor": "#bbbbbb"
}
],
"actions": [
{
"command": {
"action": "setColorScheme",
"colorScheme": "Dracula"
},
"name": "Phone up Bram Stoker",
"id": "Dracula.Draculize"
}
]
}
If you place the snippet as a .json
file inside a Fragments
folder in %LOCALAPPDATA%\Microsoft\Windows Terminal
, then you’ll be able to call a custom action called “Phone Up Bram Stoker” that sets your Color Scheme to the Dracula color scheme.
Shoutout to @DHowett for this example and draculatheme.com for the colorful theme
We have refactored terminal panes to be able to host non-Terminal content. One application of this refactor is our new, experimental Scratchpad feature. This feature open up a textbox in a separate terminal pane. To enable Scratchpad, add the following as an action
in your settings.json
file:
{"action":"splitPane","type":"scratchpad"}
After that Action is saved, you can invoke it in your Command Palette (as with every Action you make.) You can also assign a keybinding to that action as well if you do not want to open the Command Palette every time you want to use this Action.
Users can now load up an image as a texture by using the experimental.pixelShaderImagePath
setting. Huge shoutout to @mrange for this contribution and example!
In @mrange‘s example below, you can see that the pixelShaderImagePath
points to a PNG loaded as a texture which the shader pointed out by pixelShaderPath
uses.
"defaults":
{
"experimental.pixelShaderImagePath": "C:\temp\cake.png",
"experimental.pixelShaderPath": "C:\code\github\windows-terminal-shaders\cake.hlsl"
},
@mrange‘s final result looks like this:
Terminal distributions now come with an additional library, Microsoft.Terminal.UI.dll
. Its .winmd
is not required.
Marks are no longer an experimental feature! They also now reflow on resize and clear properly!
The Pane keybindings Alt+Shift++ and Alt+Shift+- will now duplicate your active profile.
Terminal will now delete its in-box color schemes from your local settings file, unless you’ve modified them.
You can no longer edit the color schemes that come with Terminal without copying them.
We’ve added new color schemes: Dark+, CGA and IBM!
Profiles now default to the icons of their .exe
files, if those can be determined. If you want your profile to have no icon, you must set the icon to "none"
(or check the “Hide icon” in Settings)
The Search box now animates in and out (thanks @tusharsnx!)
We’ve restyled the Warning and Error displays around the font settings so that they’re more readable.
We’ve started laying the groundwork for action binding so please be on the lookout for any strangeness!
Double-clicking a word on the left side of the screen will no longer select parts of your right prompt.
URLs that touch the right side of the screen or get resized are once again clickable
Double-clicking a word in a double-width or double-height row now actually selects the right word (thanks again @tusharsnx!)
During RTF export, we will now use a background color directive that Microsoft Word understands (#16035) (thanks yet again @tusharsnx!)
Our light color schemes no longer have a truly unusable selection highlight color (thanks @uoRetr0!)
We’ve fixed an issue where hyperlinks are detected in the wrong place if there’s a wide character (thanks @comzyh!)
You can no longer use the Settings UI to enter an initial size that is out of bounds (thanks @chingucoding!)
The experimental repositionCursorWithMouse
setting now actually works after you’ve scrolled the screen.
doskey
macros finally works on inputs with more than one consecutive space character.
AtlasEngine will no longer occasionally crash when rendering characters in the Unicode Private Use Area.
Huge thanks to @j4james for his help in the Virtual Terminal space!
You can now set the window (tab, pane) title with DECSWT
(Set Window Title) in addition to XTerm’s OSC 2
We now support DECAUPSS
, DECRQUPSS
and ACS
, which completes the 8-bit interface architecture.
DCS sequences that span packets will no longer get sliced in half and–in so being–destroyed.
Search highlighting was rewritten to be more robust, responsive, and performant (thanks again @tusharsnx!)
The console hosting backend no longer spuriously repaints single characters (thanks yet again @j4james!)
Moving the cursor around was surprisingly expensive so we reduced the cost of cursor invalidation!
Windows Terminal 1.21 Preview is packed with lots of updates. For a full list of changes and which versions of Windows Terminal those changes were backported to, please visit our page on the Windows Terminal GitHub repository for more information.
We love working with the community and recognizing those who made an impact for each release. Here are the community members who helped out for this one!
We would also like to give a special thanks to @hellocharli, @Blake-Madden, @wcruz-br, and @berlintay, for code quality, documentation, repository management, and dependency updates across the board!
We hope you enjoy this release of Windows Terminal 1.21 Preview! More information on these new features can be found on our docs site and if you find any bugs or have feature requests, feel free to file them on GitHub.
If you have any questions you can reach out to Christopher Nguyen (@nguyen_dows) on X (formerly Twitter.)
Thanks again!
The post Windows Terminal Preview 1.21 Release appeared first on Windows Command Line.
]]>Hello world! We are excited to announce the first major version update of Cascadia Code since the 2111.01 release three years ago! (Wow, time sure flies!) In this new 2404.03 release, we have added support for Quadrants, Sextants, Octants, Large Type Pieces, more legacy computing symbols, and Nerd Fonts to Cascadia Code. Huge shoutouts to […]
The post Cascadia Code 2404.23 appeared first on Windows Command Line.
]]>Hello world! We are excited to announce the first major version update of Cascadia Code since the 2111.01 release three years ago! (Wow, time sure flies!)
In this new 2404.03 release, we have added support for Quadrants, Sextants, Octants, Large Type Pieces, more legacy computing symbols, and Nerd Fonts to Cascadia Code. Huge shoutouts to Philippe Majerus (@PhMajerus), Aaron Bell (@aaronbell), and Fini (@Finii) for contributing to this release!
You can download the latest version of the font from the GitHub releases page and it will be shipped in the latest update of the Windows Terminal.
Quadrants are block mosaics divided into four parts. Sextants are block mosaics divided into six parts. This Cascadia Code update adds new quadrants and sextants characters from the Symbols for Legacy Computing block.
Cascadia Code now supports all 256 octants! Octants are block mosaics divided into eight parts.
Many modern command-line apps use Braille characters as pseudo-pixels to render graphics in the terminal. However, Braille is not the best solution because the symbols are using discrete dots, which makes the on-and-off pseudo-pixels unbalanced. They will always have space between symbols and between lines, so when a group of cells are used to render a graphic, the grid of pseudo-pixels is not a regular grid. Some terminals modify the Braille characters to space the dots evenly and avoid spaces between characters and lines, but that breaks their original intended use.
Octants will provide the highest resolution that can be achieved currently without using graphical extensions such as Sixels or ReGIS. Octants can also be combined with VT control sequences to generate color images
Shoutout to Philippe (@PhMajerus) for providing these Octant ANSI art examples in his ANSI-art repo!
Large type pieces are 55 characters designed to be combined to create large text. Because these are characters and not terminal effects (like DECDHL and DECDWL), they are not only limited to a terminal. The same large type text can be used in Unicode plain-text files. The only requirement is to use a font that includes those characters (like Cascadia Code version 2404.03!)
We added more legacy computing symbols to Cascadia Code. This includes eights, checkboards, diagonals, and digits!
We are adding “Cascadia Code NF” and “Cascadia Mono NF” to the Cascadia Code font family. Cascadia Code NF and Cascadia Mono NF are a native “Nerd Font” variant of Cascadia Code that includes the latest Nerd Font glyphs (as of April 2024.) Every glyph is metrics-compatible with the rest of Cascadia Code. Huge shoutouts to Aaron (@aaronbell) and Fini (@Finii) for their help with the Nerd Fonts release!
You can combine the Nerd Font variants of Cascadia Code with Oh My Posh to make your own cool looking prompt! Look at all these glyphs! (Nerd Fonts has 9209 of them!)
If you are interested any updates coming to Cascadia Code, feel free to keep an eye on the Cascadia Code repo or follow Christopher Nguyen (@nguyen_dows), Dustin Howett (@DHowett), and Aaron Bell (@aaronbell) on X.
Again, we would like to extend a huge thank you to Philippe Majerus (@PhMajerus) for contributing Quadrants, Sextants, Octants, Large Type Pieces, and additional legacy computing symbols to this release. We also want to give another huge thank you to Aaron Bell (@aaronbell) and Fini (@Finii) for their work on the Nerd Fonts project.
We hope you folks like this new update to Cascadia Code. If you have discovered a bug, would like to file a feature request, or even contribute (we’re open source!) then please do so on the Cascadia Code repo! We have more coming to Cascadia Code this year so stay tuned!
The post Cascadia Code 2404.23 appeared first on Windows Command Line.
]]>Introducing Sudo for Windows We’re excited to announce the release of Sudo for Windows in Windows 11 Insider Preview Build 26052! Sudo for Windows is a new way for users to run elevated commands directly from an unelevated console session. It is an ergonomic and familiar solution for users who want to elevate a command […]
The post Introducing Sudo for Windows! appeared first on Windows Command Line.
]]>We’re excited to announce the release of Sudo for Windows in Windows 11 Insider Preview Build 26052! Sudo for Windows is a new way for users to run elevated commands directly from an unelevated console session. It is an ergonomic and familiar solution for users who want to elevate a command without having to first open a new elevated console.
We are also excited to announce that we are open-sourcing this project here on GitHub! We’re working hard to add more information about the project in the GitHub repo and will be sharing more details about our plans in the coming months! If you’re looking for additional functionality that Sudo for Windows does not provide, check out Gerardo Grignoli’s gsudo which has a number of additional features and configuration options.
You can also check out the Microsoft Learn docs for more information here.
To enable Sudo for Windows, navigate to the Settings > For Developers page in Windows Settings and toggle on the “Enable Sudo” option:
You can alternatively enable Sudo for Windows by running the following command in an elevated console session:
sudo config --enable <configuration_option>
Sudo for Windows currently supports three different configuration options:
To change the configuration option, use the drop-down menu in the Settings > For Developers page in Windows Settings:
You can alternatively change the configuration option by running the following command in an elevated console session:
sudo config --enable <configuration_option>
In this configuration, Sudo for Windows will open a new elevated console window and run the command in that window. This is the default configuration option when sudo is enabled. For example, if you run:
sudo netstat -ab
A new window will open and the command will be run in that window:
In this configuration, Sudo for Windows will run the elevated process in the current window, but the new process will be spawned with its stdin closed. This means that the new process will not accept any user input, so this configuration will not work for processes that require further user input after elevation.
This configuration is most similar to the behavior of sudo on other operating systems. In this configuration, Sudo for Windows will run the elevated process with its stdin, stdout, and stderr all connected to the current window. This means the new elevated process can take in input and route output to the current window.
When elevating a process from the command-line with sudo, a UAC dialog will appear asking the user to confirm the elevation:
Once the user confirms the elevation, the process will be elevated based on the configuration option selected by the user.
You can check out the optional parameters for the sudo
command by running sudo -h
in your console.
In this configuration, sudo.exe will launch a new elevated console window and run the command in that window. The new window will be launched with the same working directory as the current window. The new window will also be launched with the same environment variables as the current window. This configuration has a similar flow to the runas command.
In these configurations, sudo.exe will launch a new elevated process, an elevated sudo.exe process, and the original unelevated sudo.exe will establish an RPC connection with the new elevated process. In other words, information is passed from the unelevated sudo instance to the elevated one. Specifically, the console handles from the unelevated process are passed to the elevated process which allows the elevated process to read input from the unelevated process and write output to the unelevated process. However, when sudo is configured in the “Input Closed” configuration, the elevated process will essentially not be passed the console’s input handle, so it will not be able to read input from the user.
Here is a diagram of how the process hierarchy looks:
It is important when running sudo in the “Inline” or “Input Closed” configurations to be aware of the security implications. It is possible that a medium integrity process can drive the elevated process. This risk is mitigated in the “Input Closed” configuration because the elevated process will not be able to read input from the user.
Over the coming months we will be working on expanding documentation for Sudo for Windows and will be sharing more details about the security implications of running sudo in the “Inline” configuration.
Our team is working on open-sourcing Sudo for Windows and we’re excited to share more details about our plans in the coming months. In the meantime, we’d love to hear your feedback! Please share your feedback directly in the GitHub repository.
The post Introducing Sudo for Windows! appeared first on Windows Command Line.
]]>Happy New Year! The Windows Terminal team is back with our first preview release of the year! Windows Terminal Preview 1.20 introduces several changes such as the automatic deferral of package updates while Windows Terminal is running, support for colorful and crazy line styles, changes to the way search results are highlighted and LOTS of […]
The post Windows Terminal Preview 1.20 Release appeared first on Windows Command Line.
]]>Happy New Year! The Windows Terminal team is back with our first preview release of the year! Windows Terminal Preview 1.20 introduces several changes such as the automatic deferral of package updates while Windows Terminal is running, support for colorful and crazy line styles, changes to the way search results are highlighted and LOTS of usability updates and bug fixes!
We are also updating Windows Terminal stable to version 1.19 which will include all of the features from this previous blog post. As always, you can install Windows Terminal and Windows Terminal Preview from the Microsoft Store, from the GitHub releases page, or by using winget.
If you are interested in our bleeding edge features, you can also download Windows Terminal Canary from our GitHub repo.
Now let’s talk about these new Windows Terminal Preview 1.20 changes!
The Microsoft Store will now avoid updating Windows Terminal while it is in use (we heard you asked for this!) With some new enhancements from the Store team, Terminal has opted out of automatic termination for updates on applicable versions of Windows. This behavior is not configurable, however, we believe that this will be better for our users in the long run.
Windows Terminal can now display colored and curly, dashed, or dotted and doubled underlines. You can even see this in conhost! Thank you @tusharsnx and the team for this cool addition!
You can test this out using SGR 58 and SGR 4. Here’s an example of what I used below:
"`e[58:2::255:192:203m`e[4:3mCheck out this cool sentence with colorful curly lines!`e[m"
"`e[58:2::255:192:203m`e[4:2mCheck out this cool sentence with colorful double lines!`e[m"
"`e[58:2::255:0:0m`e[4:2mCheck out this cool sentence`e[4:3m with a bunch`e[58:2::135:206:235m of lines styles `e[4:5mand colors!`e[m"
It’s 2024 so it’s time for some long awaited changes to the way we display search results in Windows Terminal! When a user now searches for text within their terminal, all the search results will be highlighted. Thank you @e82eric for this community contribution!
The AtlasEngine rendering engine is now enabled by default!
Our “Canary” ZIP distribution will now default to portable mode.
We’ve reimplemented resize with reflow; please be on the lookout for any bugs!
The readability of our various settings disclaimers has been improved (and made more Roman) (thanks @chausner!)
…and those disclaimers will no longer overlap the content! (thanks again @tusharsnx!)
You can now set a different opacity
value for unfocused panes (thanks @Jaswir!)
Added a selectionBackground
property to light color schemes (thanks @TahaHaksal!)
The mouse wheel will now automatically scroll the application when the alternate buffer is in use (“Alternate Scroll Mode” is enabled by default) (thanks @j4james!)
Double-clicking a wrapped word will now select the entire thing! (thanks @js324!)
Added single quotes to WSL drag and drop (thanks again @js324!)
We’ll now automatically clear any “Failed to reload settings” dialogs when you fix your settings.json
(thanks @codecruisedor!)
Fixed an issue where Ctrl+SPACE was not getting sent to programs running in the terminal (thanks @lonnywong!)
The Settings page will no longer forget how far you’d scrolled when it reloads (thanks @radu-cernatescu!)
Two memory leaks in our screen reader integration have been eliminated! (thanks @glenrgordon!)
The Azure Cloud Shell integration should no longer crash on a network timeout (thanks again @tusharsnx!)
During RTF export, we will now use a background color directive that Microsoft Word understands (#16035) (thanks yet again @tusharsnx!)
We’ve fixed which glyph we use for the SUB
control character (thanks @j4james!)
Once again, we’ve fixed another issue where Terminal will spontaneously fail to load Cascadia Mono.
Terminal should no longer crash after you close a couple windows on Windows 10.
Fixed font preview in conhost.
Fixed a regression that caused conhost windows to not get refreshed after software scroll.
We’d also like to give a huge shoutout to @j4james (you’ve probably seen this name before) for rewriting and fixing 11 bugs in Virtual Terminal (VT) input mode. This vastly improves our compatibility with other terminals and applications. These Virtual Terminal rewrites and changes include…
DECKPAM
(application keypad mode)
Alt+Arrow Keys generating extra characters
Mouse input when DECARM
(auto-repeat mode) is disabled
Ctrl+Anything that didn’t have a Ctrl not generating any input
Ctrl+_ generating a RET
Ctrl+: on a JIS-106 keyboard generating a ^Z
Ctrl+Alt+\ not working in WSL * Ctrl being misinterpreted under some custom keyboard layouts
Alt not working for non-alphabetic control characters
AltGr behaving improperly on some keyboards with some input
Performance and correctness of HTML and RTF copy has been vastly improved (thanks again @tusharsnx!)
Updated the Settings UI Color Schemes page to include RGB values in the tooltip and screen reader announcements.
Windows Terminal 1.20 Preview is jam packed with lots of usability updates and bug fixes. For a full list of changes and which versions of Windows Terminal those changes were backported to, please visit our 1.20 Discussion on the Windows Terminal GitHub repository for more information.
We love working with the community and recognizing those who made an impact for each release. Here are the community members who helped out for this one!
We would also like to give a special thanks to @marcelwgn, @jsoref, @RyanLua, @AtariDreams, @debghs, @mdanish-kh, and @Jvr2022 for code quality, documentation, repository management, dependency and spelling updates across the board. We couldn’t do what we do without you folks!
We hope you enjoy this release of Windows Terminal 1.20 Preview! More information on these new features can be found on our docs site and if you find any bugs or have feature requests, feel free to file them on GitHub.
Additionally, for those of you who prefer a more vintage experience, the console host in the Canary channel of the Windows Insider Program now ships with features, bug fixes and updates equivalent to the version that comes with Windows Terminal 1.19.
If you have any questions you can reach out to Christopher Nguyen (@nguyen_dows) on X (formerly Twitter.)
Thanks again for the continued support!
The post Windows Terminal Preview 1.20 Release appeared first on Windows Command Line.
]]>Today, Azure customers navigate across multiple tools, portals and knowledge bases to troubleshoot Azure incidents. Azure is now introducing Help API, an offering that streamlines and simplifies troubleshooting steps by returning relevant solutions associated with the problem, wherever you need them! Help API empowers you and/or your users to access rich, Azure curated self-help solutions, […]
The post Self-help support for Azure using Help API : CLI Extension appeared first on Windows Command Line.
]]>Today, Azure customers navigate across multiple tools, portals and knowledge bases to troubleshoot Azure incidents. Azure is now introducing Help API, an offering that streamlines and simplifies troubleshooting steps by returning relevant solutions associated with the problem, wherever you need them! Help API empowers you and/or your users to access rich, Azure curated self-help solutions, diagnostics and troubleshooters from your preferred interface, without the need to create a support case, thereby putting the power of troubleshooting issues in your own hands, within minutes from when the issue occurs! In this blogpost we will explore key features of Azure Help API from the command line.
Whether you are a direct consumer of Azure services or a reseller supporting your end users by troubleshooting issues with Azure resources, you can customize your troubleshooting experience suited to your specific needs, by integrating with Help API. Azure offers a wide range of high-quality solutions that are today only exposed via Azure portal Support + Troubleshooting experiences. Using Help API involves a two-step process.
This blogpost specifically focuses, but not limited to 3 most impactful solution offerings: Diagnostics, Azure Solutions and Troubleshooters.
Install this extension using the below CLI command. For details on each command, use -h or –help.
Az extension add –name self-help
DiscoverySolution is the initial entry point within Help API, which returns relevant solutions associated with the problem. Prior to using Discovery Solutions, you must classify your problem using problemclassification API. Discovery Solutions returns a list of relevant diagnostics and solutions using the input parameters : problemclassificationId AND resourceUri or resourceType. The resourceType/resourceUri is optional for discovery solutions, although recommended for targeted solutions.
Request Example:
# Gets list of solution metadata for an azure resource.
az self-help discovery-solution list --filter "ProblemClassificationId eq '00000000-0000-0000-0000-000000000000'" --scope 'subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'
Response Example:
The discovery solutions response consists of the following properties:
Property | Definition |
---|---|
SolutionId /articleId | Unique Identifier of solution/article |
solutionType | Type of Azure solution, example ‘diagnostics’., ‘solutions’, etc |
description | The Azure issue that the solution solves for |
Diagnostics are a powerful solution type that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue. Diagnostics are invoked using Help API in 2 steps.
Step 1: ‘Create diagnostics’ creates a diagnostic for a specific resource using solutionId from discovery solutions
Example:
# Creates a diagnostic for a resource
az self-help diagnostic create –diagnostic-name diagnostic-name –insights [{solutionId:demo2InsightV2}] –scope 'subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'
Step 2: ‘Get diagnostics’ gets the diagnostics using the ‘diagnosticsResourceName’ chosen while creating the diagnostic
Example:
az self-help diagnostic show --diagnostic-name diagnostic-name --scope 'subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to enable customers troubleshoot any Azure issue related to their subscription or resource . Azure solutions are a rich library of one or more other impactful solution components such as troubleshooters, diagnostics, data visualizations, video tutorials, diagrams, images, graphs , troubleshooting textual instructions, etc. The unique aspect about ‘solutions’ is that it is a one stop shop for all relevant content associated with your problem and/or resource. To invoke ‘solutions’ you follow 3 steps:
Step 1: ‘Create Solution’ creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId’ from discovery solutions
Example:
# Creates a solution for a resource
az self-help solution create --solution-name solution-name --trigger-criteria [{name:solutionid,value:Demo2InsightV2}] --parameters {} --scope 'subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mythe resourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'
Step 2: ‘Get Solution’ gets the solution using the applicable solutionResourceName
Example:
# Creates a solution for a resource
az self-help solution show –solution-name solution-name --scope 'subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'
Step 3: ‘Update solution’ updates additional information needed to execute the solution
Example:
# Updates solution for a resource.
az self-help solution update --solution-name solution-name --trigger-criteria [{name:ReplacementKey,value:<!--56ee7509-92e1-4b9e-97c2-dda53065294c-->}] --parameters {SearchText:CanNotRDP,SymptomId:KeyVaultVaultNotFoundInsight} --scope 'subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'
Troubleshooters is a type of Azure solutions that dynamically guides you through your troubleshooting steps using a combination of backend resource signals and user inputs through step by step workflows. There are 5 steps to invoke troubleshooters:
Step 1: ‘Create Troubleshooter’ creates the specific troubleshooter action under a resource using the ‘solutionId’ as trigger
Example:
# Creates a troubleshooter for a resource
az self-help troubleshooter create –troubleshooter-name 12345678-BBBb-cCCCC-0000-123456789012 --solution-id e104dbdf-9e14-4c9f-bc78-21ac90382231 --parameters {ResourceUri:'subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'} --scope 'subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'
Step 2 : ‘Get Troubleshooter’ gets the troubleshooter instance which includes the result of the troubleshooter being executed
Example:
# Gets a troubleshooter for a resource
az self-help troubleshooter show --troubleshooter-name 12345678-BBBb-cCCCC-0000-123456789012 --scope 'subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'
Step 3: ‘Restart Troubleshooter’ restarts the troubleshooter API using applicable troubleshooter resource name as the input
Example:
# Restarts troubleshooter for a resource
az self-help troubleshooter restart --troubleshooter-name 12345678-BBBb-cCCCC-0000-123456789012 --scope 'subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'
Step 4: ‘End Troubleshooter’ ends the troubleshooter action
Example:
# Ends a troubleshooter instance
az self-help troubleshooter end --troubleshooter-name 12345678-BBBb-cCCCC-0000-123456789012 --scope 'subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'
Step 5: ‘Continue Troubleshooter’ uses ‘stepId’ and ‘responses’ as trigger to continue the troubleshooting steps for the respective troubleshooter
Example:
# Continues troubleshooter for a resource.
az self-help troubleshooter continue --troubleshooter-name 12345678-BBBb-cCCCC-0000-123456789012 --step-id step-id --responses [] --scope 'subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read'
This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions.
Example:
# Check resource uniqueness
Az self-help check-name-availability --scope subscriptions/00000000-0000-0000-0000-000000000000 --name diagnostic-name --type 'Microsoft.Help/diagnostics' az self-help check-name-availability --scope subscriptions/00000000-0000-0000-0000-000000000000 --name solution-name --type 'Microsoft.Help/solutions' az self-help check-name-availability --scope subscriptions/00000000-0000-0000-0000-000000000000 --name 12345678-BBBb-cCCCC-0000-123456789012 --type 'Microsoft.Help/troubleshooters'
Thank you for exploring the key features of Azure Help API CLI Extension with us. We value your feedback in helping us scale and improve your troubleshooting experience with Help API. If you have feedback or suggestions while using Help API CLI extension, please share your thoughts with us using the following channels.
The post Self-help support for Azure using Help API : CLI Extension appeared first on Windows Command Line.
]]>