wiki.getshifting.com

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


vscodetasks
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
vscodetasks [2025/06/01 11:59] – created - external edit 127.0.0.1vscodetasks [2025/10/25 18:06] (current) – external edit 127.0.0.1
Line 122: Line 122:
 <code powershell> <code powershell>
 Write-Host "Make sure you have activated the correct PIM group: https://portal.azure.com/#view/Microsoft_Azure_PIMCommon/ActivationMenuBlade/~/aadgroup" Write-Host "Make sure you have activated the correct PIM group: https://portal.azure.com/#view/Microsoft_Azure_PIMCommon/ActivationMenuBlade/~/aadgroup"
-Write-Host "Login to azure (use 'az logout' in case of problems)+Write-Host "Login to azure - If the popup doesn't show please minimize the windows to expose the top-left corner of the screen-foregroundcolor blue 
-Using az login because Connect-AzAccount opens login dialog in the background +We need to use the azure cli as creating the tunnel to the jumpbox will only work with the azure cli 
-Connect-AzAccount -SubscriptionId aa123456-a123-a123-a123-abcd12345678 +az logout 
-az login+Disable the subscription selector feature as well as sign in with WAM 
 +az config set core.login_experience_v2=off 
 +az config set core.enable_broker_on_windows=false 
 +az login --tenant 7e4an71d-a123-a123-a123-abcd12345678
 Write-Host "Set subscription to hub subscription which has the bastion" Write-Host "Set subscription to hub subscription which has the bastion"
-Set-AzContext -Subscription aa123456-a123-a123-a123-abcd12345678 | Out-Null 
 az account set --subscription aa123456-a123-a123-a123-abcd12345678 az account set --subscription aa123456-a123-a123-a123-abcd12345678
-# Remove the known hosts file, these are environment specific 
-$daysToKeepKnownHosts = 28 
-$limit = (Get-Date).AddDays(-$daysToKeepKnownHosts) 
-$knownHostsPath = 'C:\Users\sjoer\.ssh' 
-$knownHostsFile = 'known_hosts' 
-Write-Host "Rename and remove known_hosts file: $knownHostsPath\$knownHostsFile" 
-if (Test-Path $knownHostsPath\$knownHostsFile){ 
-    Get-ChildItem $knownHostsPath\$knownHostsFile | Rename-Item -NewName { $_.BaseName + (Get-Date -Format "yyyyMMdd-HHmm") + $_.Extension } -Verbose 
-    Get-ChildItem $knownHostsPath | Where-Object { ($_.CreationTime -lt $limit) -AND ($_.Name -like "$knownHostsFile*") } | Remove-Item -Force -Verbose 
-} else { 
-    Write-Host "The file $knownHostsPath\$knownHostsFile does not exist." 
-} 
 $subscription = Get-AzContext $subscription = Get-AzContext
 Write-Host "Done, you are now in $($subscription.Subscription.Name). Use one of the other tasks to continue." -foregroundcolor green Write-Host "Done, you are now in $($subscription.Subscription.Name). Use one of the other tasks to continue." -foregroundcolor green
Line 312: Line 302:
 * [[https://code.visualstudio.com/docs/editor/tasks|VSCode Tasks]] * [[https://code.visualstudio.com/docs/editor/tasks|VSCode Tasks]]
 * [[https://marketplace.visualstudio.com/items?itemName=iulian-radu-at.vscode-tasks-sidebar|VSCode Tasks Sidebar]] * [[https://marketplace.visualstudio.com/items?itemName=iulian-radu-at.vscode-tasks-sidebar|VSCode Tasks Sidebar]]
 +
 +//This wiki has been made possible by://
 +
 +<HTML>
 +<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8613096447910897"
 +     crossorigin="anonymous"></script>
 +<!-- Wiki End of Page -->
 +<ins class="adsbygoogle"
 +     style="display:block"
 +     data-ad-client="ca-pub-8613096447910897"
 +     data-ad-slot="6221699236"
 +     data-ad-format="auto"
 +     data-full-width-responsive="true"></ins>
 +<script>
 +     (adsbygoogle = window.adsbygoogle || []).push({});
 +</script>
 +</HTML>
 +
 +
  
vscodetasks.1748779162.txt.gz · Last modified: by 127.0.0.1