# admin terminal
wsreset -i
# then wait for around 30syep. Simple is that.
P.s. when second user wants store as well, run
# admin terminal
wsreset -i
# then wait for around 30syep. Simple is that.
P.s. when second user wants store as well, run
| using System; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Threading.Tasks; | |
| using Windows.Media.SpeechRecognition; | |
| using System.Windows.Controls; | |
| using System.Windows.Input; | |
| using Westwind.Utilities; | |
| using MarkdownMonster.Windows; | |
| using Windows.Globalization; |
| #Requires -RunAsAdministrator | |
| # Disable telemetry in Visual Studio 2022 - https://learn.microsoft.com/en-us/visualstudio/ide/visual-studio-experience-improvement-program?view=vs-2022 | |
| New-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\VSCommon\17.0\SQM" -Name "OptIn" -Value "0" -PropertyType "DWORD" -Force | |
| # Delete telemetry directories | |
| Remove-Item -Path "$env:APPDATA\vstelemetry" -Recurse -Force -ErrorAction SilentlyContinue | |
| Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\VSApplicationInsights" -Recurse -Force -ErrorAction SilentlyContinue | |
| Remove-Item -Path "$env:PROGRAMDATA\Microsoft\VSApplicationInsights" -Recurse -Force -ErrorAction SilentlyContinue | |
| Remove-Item -Path "$env:TEMP\Microsoft\VSApplicationInsights" -Recurse -Force -ErrorAction SilentlyContinue |
| These are the files used in Effortless SQL Query Crafting: Unleashing GitHub Copilot's Power post. See here: | |
| https://medium.com/@massimopiccardo/effortless-sql-query-crafting-unleashing-github-copilots-power-d09136e92de8 | |
| DatabaseContextCreation_base.sql --> A basic query to generate a list of comments to use as a context for copilot generated queries | |
| DatabaseContextCreation_relations.sql --> An evolution of the base one, adding foreing keys information | |
| DatabaseContextCreation_descriptions.sql --> Another evolution, adding table and column free text descriptions | |
| sp_AddUpdateDescription.sql --> A stored procedure to simplify the definition of descriptions ofr tables and columns | |
| <# : | |
| @echo off & setlocal & set __args=%* & %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -Command Invoke-Expression ('. { ' + (Get-Content -LiteralPath ""%~f0"" -Raw) + ' }' + $env:__args) & exit /b %ERRORLEVEL% | |
| #> Add-Type @' | |
| // ========== BEGIN C# CODE ========== | |
| using System; | |
| public class App | |
| { | |
| public static void Run(string[] args) | |
| { |
| Set-StrictMode -Version Latest | |
| $ErrorActionPreference = "Stop" | |
| function Enable-IISAssemblyDebugging | |
| { | |
| param( | |
| [string]$Path = ".", | |
| [string]$Filter = "*.dll" | |
| ) |
| param ( | |
| [switch]$RenameOrphanLayers | |
| ) | |
| If ($RenameOrphanLayers) { | |
| Write-Warning "$($env:COMPUTERNAME) -RenameOrphanLayers option enabled, will rename all orphan layers" | |
| } | |
| # Get known layers on Docker images | |
| [array]$ImageDetails += docker images -q | ForEach { docker inspect $_ | ConvertFrom-Json } |
| using System; | |
| using System.Runtime.InteropServices; | |
| /// <summary> | |
| /// From: https://www.codeproject.com/Articles/3792/C-does-Shell-Part-4 | |
| /// Note: The UCOMIEnumString interface is deprecated in .NET as of 2018! | |
| /// </summary> | |
| public class AutoCompleteExt { | |
| public static Guid CLSID_AutoComplete = new Guid("{00BB2763-6A77-11D0-A535-00C04FD7D062}"); |
| logman --% start dotNetTrace -p Microsoft-Windows-DotNETRuntime (JitKeyword,NGenKeyword,InteropKeyword,LoaderKeyword) win:Informational -o dotNetTrace.etl -ets | |
| # Do your evil .NET thing now. In this example, I executed the Microsoft.Workflow.Compiler.exe bypass | |
| # logman stop dotNetTrace -ets | |
| # This is the process ID of the process I want to capture. In this case, Microsoft.Workflow.Compiler.exe | |
| # I got the process ID by running a procmon trace | |
| $TargetProcessId = 8256 |
| # https://gist.github.com/timabell/bc90e0808ec1cda173ca09225a16e194 | |
| # MIT license | |
| $exts=@( | |
| "csv", | |
| "csproj", | |
| "json", | |
| "log", | |
| "md", | |
| "patch", | |
| "sql", |