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 requests | |
import re | |
import pandas as pd | |
import csv | |
from random import choice | |
from bs4 import BeautifulSoup | |
from datetime import datetime | |
from time import mktime |
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
<# | |
.Synopsis | |
Return basic details on AD objects | |
.EXAMPLE | |
Get-ADObjectInfo -Computers | |
.EXAMPLE | |
Get-ADObjectInfo -Users | Format-Table -Autosize | |
.EXAMPLE | |
Get-ADObjectInfo -Users | Export-Csv -Path C:\Users.csv -nti | |
#> |
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
Measure-Command { Write-Output (((Select-String -Path (Get-ChildItem C:\FoxDeploy -Recurse -Filter *.pgn) -Pattern '^\[Result\s"\d.*' -AllMatches).Matches.Value ) | Group-Object -NoElement | Format-Table -AutoSize) } |
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
break | |
#0o0o0o0o0 git content | |
$ContentPaths = 'C:\Lab\Git\Prod','C:\Lab\Git\Test','C:\Lab\Git\Dev' | |
git clone https://github.com/bundyfx/Example-Web.git $ContentPaths[0] --quiet | |
git clone https://github.com/bundyfx/Web-Example-Test.git $ContentPaths[1] --quiet | |
git clone https://github.com/bundyfx/Web-Example-Dev.git $ContentPaths[2] --quiet | |
ii C:\Lab\Git |
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
#Starting Section | |
$reader=(New-Object System.Xml.XmlNodeReader $xaml) | |
$Window=[Windows.Markup.XamlReader]::Load($reader) |
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
<Window | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:local="clr-namespace:WpfApplication3" | |
Title="DSC Control Center" Height="491.015" Width="1102.416" ResizeMode="NoResize"> | |
<Grid> | |
<TextBox Name="Computer" HorizontalAlignment="Left" Height="23" Margin="81,9,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="170"/> | |
<Label Name="label" Content="Computer:" HorizontalAlignment="Left" Margin="10,6,0,0" VerticalAlignment="Top" Width="66"/> |
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
<# | |
.Synopsis | |
Get the Up time (Last boot time) of target machines. | |
.EXAMPLE | |
Get-Uptime -Computername DC1,NLB1,NLB2 | |
.EXAMPLE | |
$Collection | Gup | |
.EXAMPLE | |
$Collection | Get-Uptime | Export-CSV C:\Temp\UpTime.csv -nti | |
.EXAMPLE |
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
$list = @" | |
1 Partridge in a pear tree | |
2 Turtle Doves | |
3 French Hens | |
4 Calling Birds | |
5 Golden Rings | |
6 Geese a laying | |
7 Swans a swimming | |
8 Maids a milking | |
9 Ladies dancing |
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]$VMNameStr) | |
0..(($VMNameStr -split ",").GetLength(0) -1) | % {Set-Variable "VMName$Psitem" -Value ($VMNameStr -split ',')[$Psitem] -PassThru } | |
#The VMNameStr param is intended to be taken as a single string rather than the conventional array of strings ([String[]]). | |
#Take values from param, split those and turn it in a range, Foreach of those create a new variable based on the number coming across the pipeline. | |
#The value of those variables will be the original array split calling the position index of the current item in the pipeline (Passthru to display this on the screen). |
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
#Requires -Version 3.0 | |
<# | |
.Synopsis | |
Get the latest updates on your favourite NBA teams! | |
.EXAMPLE | |
Get-RSSFeed -Team Lakers | |
.EXAMPLE | |
Get-RSSFeed Spurs | |
.NOTES | |
Why not combine two of my favourite things! PowerShell/NBA |
NewerOlder