This file contains hidden or 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
| invoke-command { | |
| $members = net localgroup administrators | | |
| where {$_ -AND $_ -notmatch "command completed successfully"} | | |
| select -skip 4 | |
| New-Object PSObject -Property @{ | |
| Computername = $env:COMPUTERNAME | |
| Group = "Administrators" | |
| Members=$members | |
| } | |
| } -computer chi-fp01,chi-win8-01,chi-ex01 -HideComputerName | |
This file contains hidden or 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
| PS C:\> Get-NetLocalGroup -Group "remote desktop users" -Computername $sessions | |
| Group : remote desktop users | |
| Computername : CHI-FP01 | |
| Members : | |
| Group : remote desktop users | |
| Computername : CHI-WIN8-01 | |
| Members : | |
| Computername : CHI-EX01 | |
| Members : | |
| Group : remote desktop users |
This file contains hidden or 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
| Function Get-NetLocalGroup { | |
| [cmdletbinding()] | |
| Param( | |
| [Parameter(Position=0)] | |
| [ValidateNotNullorEmpty()] | |
| [object[]]$Computername=$env:computername, | |
| [ValidateNotNullorEmpty()] | |
| [string]$Group = "Administrators", | |
| [switch]$Asjob | |
| ) |
This file contains hidden or 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( | |
| $domain | |
| ) #end param | |
| # Begin Functions | |
| Function funWhoIs() | |
| { | |
| βObtaining WhoIs $domain β¦β | |
| $strQuery=βhttp://reports.internic.net/cgi/whois?whois_nic=$domain&type=domainβ |
This file contains hidden or 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
| version: 2 | |
| jobs: | |
| code_analyze: | |
| docker: | |
| - image: circleci/openjdk:8 | |
| steps: | |
| - run: | |
| name: Clone repository | |
| command: git clone https://bitbucket.org/some_repo/perl.git | |
| - run: |
This file contains hidden or 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
| FROM alpine:3.9 | |
| RUN \ | |
| apk update && \ | |
| apk add bash py-pip && \ | |
| apk add --virtual=build gcc libffi-dev musl-dev openssl-dev python-dev make && \ | |
| pip --no-cache-dir install -U pip && \ | |
| pip install azure-cli && \ | |
| apk del --purge build |
This file contains hidden or 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
| $ docker run --rm -e AZURE_APPLICATION_ID=[Your Application ID] \ | |
| -e AZURE_SECRET=[Your Secret] \ | |
| -e AZURE_TENANT_ID=[Your Tenant ID] \ | |
| -e CMD="/usr/bin/az vm start -g [ResourceGroup] -n [VM Name]" azure-cli-centos:v1.0 |
This file contains hidden or 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
| FROM centos:7.6.1810 | |
| RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc && \ | |
| echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" \ | |
| > /etc/yum.repos.d/azure-cli.repo | |
| RUN yum install -y azure-cli | |
| CMD /usr/bin/az login --service-principal \ | |
| -u $AZURE_APPLICATION_ID \ | |
| -p $AZURE_SECRET \ |
This file contains hidden or 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
| [root@dlp ~]# yum -y install ntp | |
| [root@dlp ~]# vi /etc/ntp.conf | |
| # line 19: add the network range you allow to receive requestsrestrict 10.0.0.0 mask 255.255.255.0 nomodify notrap | |
| # change servers for synchronization | |
| # | |
| server 0.rhel.pool.ntp.org | |
| # | |
| server 1.rhel.pool.ntp.org | |
| # | |
| server 2.rhel.pool.ntp.org |
This file contains hidden or 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( | |
| $domain | |
| ) #end param | |
| # Begin Functions | |
| Function funWhoIs() | |
| { | |
| "Obtaining WhoIs $domain ..." | |
| $strQuery="http://reports.internic.net/cgi/whois?whois_nic=$domain&type=domain" |