Skip to content

Instantly share code, notes, and snippets.

View jawn's full-sized avatar
✔️
Probably sending a PR for typos.

Bernard Vander Beken jawn

✔️
Probably sending a PR for typos.
View GitHub Profile
@jongalloway
jongalloway / PcRepave.cmd
Last active February 23, 2023 18:02
Chocolatey list generated using: choco list --localonly --idonly
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco feature enable -n allowGlobalConfirmation
choco install 7zip /y
choco install 7zip.install /y
choco install ARMClient /y
choco install audacity /y
choco install audacity-lame /y
choco install autohotkey /y
choco install autohotkey.install /y
@PaulStovell
PaulStovell / PowerShell invoker.cs
Created February 26, 2013 12:00
Invoking PowerShell, with variables
using System;
using System.IO;
using System.IO.IsolatedStorage;
using System.Management.Automation;
using System.Text;
using PowerShellHosting.Util;
namespace PowerShellHosting.File
{
public class FileBasedPowerShellRunner : IPowerShell
@jstangroome
jstangroome / gist:785710
Created January 19, 2011 04:57
Download a file from TFS 2010 source control via PowerShell
$CollectionUrl = 'http://localhost:8080/tfs/defaultcollection'
Add-Type -AssemblyName 'Microsoft.TeamFoundation.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Add-Type -AssemblyName 'Microsoft.TeamFoundation.VersionControl.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
$Collection = New-Object -TypeName Microsoft.TeamFoundation.Client.TfsTeamProjectCollection -ArgumentList $CollectionUrl
$VersionControl = $Collection.GetService([Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer])
$DestinationFile = [IO.Path]::GetTempFileName()
$VersionControl.DownloadFile('$/Test/BuildProcessTemplates/DefaultTemplate.xaml', $DestinationFile)