Skip to content

Instantly share code, notes, and snippets.

@chenbojian
Last active July 28, 2020 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chenbojian/cdc55ff8ccbabf841bb5a6d032164bb0 to your computer and use it in GitHub Desktop.
Save chenbojian/cdc55ff8ccbabf841bb5a6d032164bb0 to your computer and use it in GitHub Desktop.

Get windows installed applications with powershell

$x86Path = "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
$installedItemsX86 = Get-ItemProperty -Path $x86Path | Select-Object -Property DisplayName, PSChildName
$x64Path = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
$installedItemsX64 = Get-ItemProperty -Path $x64Path | Select-Object -Property DisplayName, PSChildName
$installedItems = $installedItemsX86 + $installedItemsX64
$installedItems | Where-Object -FilterScript { $_.DisplayName -like "Microsoft SQL Server Management Studio*" } | Sort-Object -Property DisplayName | fl

Change SQL Authentication Mode (1 is Windows-Only, 2 is Mixed) restart service to take effect.

USE [master]
GO
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', 
     N'Software\Microsoft\MSSQLServer\MSSQLServer',
     N'LoginMode', REG_DWORD, 2
GO

Check .NET framework version link

Get-Item 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment