Skip to content

Instantly share code, notes, and snippets.

View dfranciscus's full-sized avatar

Dan Franciscus dfranciscus

View GitHub Profile
PS C:\chocotemp> choco upgrade icloud -y --source .
Chocolatey v0.10.15 Business
Upgrading the following packages:
icloud
By upgrading you accept licenses for the packages.
You have iCloud v7.10.0 installed. Version 7.12.0.14 is available based on your source(s).
iCloud v7.12.0.14
icloud package files upgrade completed. Performing other installation steps.
$packages = [System.Collections.ArrayList]@(choco outdated -r --ignore-unfound --ignore-pinned | Foreach-Object {
($_.split("|"))[0]})
foreach ($package in $packages)
{
choco upgrade $package -r -y --timeout=600 | Out-File ("c:\Windows\Temp\choco-" + $package + ".txt")
if ($LASTEXITCODE -ne 0)
{
$Result = 'Failed'
}
@dfranciscus
dfranciscus / boxstartettest.txt
Last active March 9, 2019 15:17
Install stuff
Set-TimeZone -Name "Eastern Standard Time" -Verbose
choco install googlechrome -y
choco install firefox -y
choco install git -y
choco install wsl -y
choco install vscode -y
choco install vscode-powershell -y
Disable-BingSearch
Set-TaskbarOptions -Dock Bottom
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showFileExtensions
dsc {'Autologon':
resource_name => 'cAutologon',
module => {
name => 'DSCR_AutoLogon',
version => '2.1.0'
},
properties => {
ensure => 'present',
AutoLogonCredential => {
@dfranciscus
dfranciscus / gist:0ac96254900abf59accad2143cb08dd2
Created January 4, 2018 18:25
Vagrant Puppet test environment output
Bringing machine 'puppet' up with 'virtualbox' provider...
Bringing machine 'puppetagent-1' up with 'virtualbox' provider...
Bringing machine 'puppetagent-2' up with 'virtualbox' provider...
==> puppet: Importing base box 'bento/centos-7.2'...
Progress: 20%
Progress: 50%
Progress: 60%
Progress: 70%
Progress: 90%
@dfranciscus
dfranciscus / gist:4a9e50ec12748635e9c830e79b41afb8
Created January 4, 2018 18:14
Vagrant Puppet test environment
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "puppet" do |puppet|
puppet.vm.box = "bento/centos-7.2"
puppet.vm.network "private_network", ip: "192.168.10.21"
puppet.vm.hostname = "puppet"
puppet.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "4096"]
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrant multi-machine sample setup
Vagrant.configure("2") do |config|
config.vm.define "puppet" do |puppet|
puppet.vm.box = "bento/centos-7.2"
puppet.vm.network "private_network", ip: "192.168.10.21"
puppet.vm.hostname = "puppet"
puppet.vm.provider :virtualbox do |vb|
Last login: Sat Dec 2 12:54:50 on ttys000
vpn-59:~ dan$ cd CentOS/
vpn-59:CentOS dan$ ls
Vagrantfile
vpn-59:CentOS dan$ ls -la
total 8
drwxr-xr-x 4 dan staff 128 Nov 4 14:02 .
drwxr-xr-x+ 39 dan staff 1248 Nov 18 09:46 ..
drwxr-xr-x 3 dan staff 96 Nov 4 14:02 .vagrant
-rw-r--r-- 1 dan staff 3015 Nov 4 13:56 Vagrantfile
function New-FantasyDraftOrder {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string[]]$Players
)
$Position = 1
$Players = $Players | Sort-Object {Get-Random}
foreach ($Player in $Players)
{
Invoke-Command -ComputerName (Get-ADComputer -Filter 'operatingsystem -like "*Server 2012*"' -Properties * | Select -ExpandProperty Name) -ScriptBlock {Get-SmbSession | Select *} | Select-Object PSComputername,Dialect,ClientComputerName,Clientusername
PSComputerName Dialect ClientComputerName ClientUserName
-------------- ------- ------------------ --------------
Server 3.02 172.16.12.90 DOMAIN\Test$
Server 3.02 172.16.12.100 DOMAIN\Test2$