Skip to content

Instantly share code, notes, and snippets.

Working from home, yeah

Igor Andriushchenko doshyt

Working from home, yeah
View GitHub Profile
doshyt / getBinariesVersions.ps1
Last active Feb 15, 2019
Script to record versions of all binaries from the folder and subfolders to a CSV file. Useful to produce component lists in software builds.
View getBinariesVersions.ps1
$targetPath = "."
$candidateBin = @()
$candidateBin += Get-ChildItem -Path $targetPath -Recurse -Include *.dll,*.exe -Exclude *Nunit*,*test* |
ForEach-Object {
try {
$_ | Add-Member NoteProperty FileVersion ($_.VersionInfo.FileVersion)
} catch {}
} | Select-Object BaseName,FileVersion
doshyt / Install-OmsAgent.ps1
Created Oct 1, 2018
Installs OMS agent from the ZIP archive that is created of the unpacked agent MSI
View Install-OmsAgent.ps1
try {
Write-Host "Downloading OMS agent"
Invoke-WebRequest -Uri $AgentDownloadUrl -OutFile
Write-Host "Extracting OMS agent"
Add-Type -AssemblyName System.IO.Compression.FileSystem
View SqlAllowThroughFirewall.ps1
netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = profile = PUBLIC
doshyt / Get-UserAdGroups.ps1
Created Jul 24, 2017
One-liner for getting user group membership from AD
View Get-UserAdGroups.ps1
Import-Module ActiveDirectory; Get-ADPrincipalGroupMembership $(Get-AdUser -f {SamAccountNAme -like 'XXXYYY'})
You can’t perform that action at this time.