This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir C:\apps\otel-collector | |
set-location C:\apps\otel-collector | |
# download | |
wget.exe https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.83.0/otelcol-contrib_0.83.0_windows_amd64.tar.gz | |
#extract | |
#C:\Windows\System32\tar.exe xvfz .\otelcol-contrib_0.83.0_windows_amd64.tar.gz | |
Install-Package -ProviderName PowerShellGet 7Zip4PowerShell -Force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Get-ChildItem -Path Env:\ | |
# add more than 64k of environment variables | |
$variableNameToAdd = "x" | |
$variableValueToAdd = "xxxxx" | |
#[System.Environment]::SetEnvironmentVariable($variableNameToAdd, $variableValueToAdd, [System.EnvironmentVariableTarget]::Machine) | |
#[System.Environment]::SetEnvironmentVariable($variableNameToAdd, $variableValueToAdd, [System.EnvironmentVariableTarget]::Process) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration SSLPerfectForwardSecrecyTLS12 | |
{ | |
Import-DscResource -ModuleName GraniResource | |
#region Protcol Configuration | |
# Disable Multi-Protocol Unified Hello | |
Registry "DisableServerMultiProtocolUnifiedHello" | |
{ | |
Key = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Server" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote update | |
git reset --hard upstream/master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#do just one | |
get-package | Group-Object Id | foreach { [pscustomobject]@{ packagename=$_.Name; VG=$_.Group ;versions=($_.Group |select -expandproperty versions |select -ExpandProperty Version); versionMAX=($_.Group |select -expandproperty versions |select -ExpandProperty Version |sort -property versions -descending |select -last 1) } } | foreach { [pscustomobject]@{ packagename=$_.packagename; VG=$_.VG; versions=$_.versions; versionCount= $_.versions.Count; versionMAX=$_.versionMAX }} | where versionCount -gt 1 | foreach { [pscustomobject]@{ packagename=$_.packagename; VG=$_.VG; versions=$_.versions; versionMAX=$_.versionMAX; dversions=($_.versions | select -Unique) }} | foreach { [pscustomobject]@{ packagename=$_.packagename; VG=$_.VG; versionMAX=$_.versionMAX; PN=$_.VG.ProjectName; versions=$_.versions; dversionCount=$_.dversions.Count }} | where dversionCount -gt 1 | select -first 1 | foreach { foreach($v in $_.VG) { update-package -Id $v.Id -Version $_.versionMAX -projectname $v.ProjectName } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gci -r -Filter *.csproj -PipelineVariable projectname | select-xml '//*[local-name()="TargetFrameworkVersion"]' | Select-Object -Expand Node -PipelineVariable version | foreach { [pscustomobject]@{ proj=$projectname.FullName; version = $version.InnerXML}} | sort -Property version| format-table version,proj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$p = get-package | |
$p | select -ExpandProperty Versions -Property ProcessName, Id, ProjectName | format-table | |
$flatp = $p | select -ExpandProperty Versions -Property ProcessName, Id, ProjectName | |
$flatp = $flatp | select -Property Id, ProjectName, Version | |
$groupedpackages = $flatp | group Id | |
$packwithmorthanone = $groupedpackages | where { $_.Group.Count -gt 1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$grouped = get-package | Group-Object Id | |
$morethanone = $grouped | where-object {$_.Count -gt 1} | |
foreach($pkg in $morethanone) { $max = $pkg.Group | sort Version -descending | select -first 1; $maxFirstVersion = $max.Versions | select -first 1; foreach($proj in $pkg.Group) { write-host $max.Id $proj.ProjectName $maxFirstVersion; Update-Package -Id $max.Id -ProjectName $proj.ProjectName -Version $maxFirstVersion } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[string]$tfsServer = "http://tfs:8080/tfs/DefaultCollection", | |
[string]$projectName = "projectname", | |
[string]$username = "domain\username", | |
[string]$password = "XXXX", | |
[string]$outputDirectory = "d:\temp", | |
[string]$apiVersion = "2.0" | |
) | |
$tfsUrl = $tfsServer + '/' + $projectName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#param ( | |
# [string]$tfsServer = "http://tfs:8080/tfs/DefaultCollection", | |
# [string]$tfsLocation = "$\stuff\of\dreams", | |
# [string]$remoteFolder | |
#) | |
$clientDll = "C:\Program Files (x86)\Microsoft Team Foundation Server 2015 Power Tools\Microsoft.TeamFoundation.Client.dll" | |
$versionControlClientDll = "C:\Program Files (x86)\Microsoft Team Foundation Server 2015 Power Tools\Microsoft.TeamFoundation.VersionControl.Client.dll" | |
$versionControlCommonDll = "C:\Program Files (x86)\Microsoft Team Foundation Server 2015 Power Tools\Microsoft.TeamFoundation.VersionControl.Common.dll" | |
$buildClientDLL = "C:\Program Files (x86)\Microsoft Team Foundation Server 2015 Power Tools\Microsoft.TeamFoundation.Build.Client.dll" |
NewerOlder