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
Import-Module ActiveDirectory; Get-ADPrincipalGroupMembership $(Get-AdUser -f {SamAccountNAme -like 'XXXYYY'}) |
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
netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = 10.0.0.0/16 profile = PUBLIC |
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]$AgentDownloadUrl="http://127.0.0.1/omsagent.zip", | |
[string]$WorkspaceId, | |
[string]$WorkspaceKey | |
) | |
try { | |
Write-Host "Downloading OMS agent" | |
Invoke-WebRequest -Uri $AgentDownloadUrl -OutFile omsagent.zip | |
Write-Host "Extracting OMS agent" | |
Add-Type -AssemblyName System.IO.Compression.FileSystem |
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
$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 |
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
#!/bin/bash | |
imageRepository="python" | |
version="3.4-alpine" | |
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /tmp/.trivyignore:/tmp/.trivyignore \ | |
aquasec/trivy image \ | |
--ignorefile /tmp/.trivyignore \ | |
--no-progress --exit-code 1 \ | |
${imageRepository}:${version} |
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
CULPRIT="rc"; TARGETS=( "awesome-repo-1" "awesome-repo-2" ); for element in "${TARGETS[@]}"; do echo "Checking $element"; find $element/node_modules -path "*/$CULPRIT/**" -prune -name "package.json" -exec cat {} + | grep -e \"version\": -e _location ; done |