Skip to content

Add pin of Powershell Core 7+ #147

Answered by farag2
jgsjnr asked this question in Q&A
Mar 16, 2021 · 3 comments · 4 replies
Discussion options

You must be logged in to vote
Clear-Host

if (-not (Get-Package -ProviderName msi -Name "PowerShell 7*x64"))
{
	exit
}

$Parameters = @{
	Size = "2x2"
	Column = 0
	Row = 0
	AppID = "Microsoft.AutoGenerated.{A49227EA-5AF0-D494-A3F1-0918A278ED71}" # PowerShell 7 x64
	# AppID = "Microsoft.AutoGenerated.{CD9EFC53-1ACE-EA00-530A-3EC179D1971C}" # PowerShell 7 Preview x64
}

[string]$StartLayoutNS = "http://schemas.microsoft.com/Start/2014/StartLayout"

# Add pre-configured hastable to XML
function Add-Tile
{
	param
	(
		[string]
		$Size,

		[int]
		$Column,

		[int]
		$Row,

		[string]
		$AppID
	)

	[string]$elementName = "start:DesktopApplicationTile"
	[Xml.XmlElement]$Table = $xml.CreateElement($elementName, $StartLayoutNS)…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@jgsjnr
Comment options

@jgsjnr
Comment options

Comment options

You must be logged in to vote
1 reply
@jgsjnr
Comment options

Comment options

You must be logged in to vote
1 reply
@jgsjnr
Comment options

Answer selected by farag2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants