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 PoSH modules | |
Write-Verbose -Message "Loading Modules..." -Verbose | |
Get-Module -ListAvailable VMware* | Import-Module | Out-Null | |
#connect to VCenter | |
$path = "C:\Users\$env:UserName\.ssh\vmca.xml" | |
if(!(test-Path $path)){ | |
Write-Host "Please create VMWare credentials file with the command" | |
Write-Host "New-VICredentialStoreItem -Host <vCenter server name/IP> -User <User name of vCenter server administrator> -Password <Password> -File <Location where you want to save the file to along with file name>" | |
Write-Host "Example: New-VICredentialStoreItem -Host vcenter.example.com -User joe.smith@example.com -Password 12345678910$# -File C:\Users\$env:UserName\.ssh\vmca.xml" |
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 PoSH modules | |
Write-Verbose -Message "Loading Modules..." -Verbose | |
Get-Module -ListAvailable VMware* | Import-Module | Out-Null | |
#connect to VCenter | |
$path = "C:\Users\$env:UserName\.ssh\vmca.xml" | |
if(!(test-Path $path)){ | |
Write-Host "Please create VMWare credentials file with the command" | |
Write-Host "New-VICredentialStoreItem -Host <vCenter server name/IP> -User <User name of vCenter server administrator> -Password <Password> -File <Location where you want to save the file to along with file name>" | |
Write-Host "Example: New-VICredentialStoreItem -Host vcenter.example.com -User joe.smith@example.com -Password 12345678910$# -File C:\Users\$env:UserName\.ssh\vmca.xml" |
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( | |
[parameter(mandatory = $true)][String]$VMName | |
) | |
# Requires that you have PowerCli installed | |
# Get it with the command: PS> Install-Module -Name VMware.PowerCLI | |
Clear-Host | |
Write-Verbose -Message "Loading Modules..." -Verbose | |
if (Get-Module -ListAvailable -Name VMware.PowerCLI) { | |
Write-Host "Module exists" |
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
Function Get-WUInstall | |
{ | |
<# | |
.SYNOPSIS | |
Download and install updates. | |
.DESCRIPTION | |
Use Get-WUInstall to get list of available updates, next download and install it. | |
There are two types of filtering update: Pre search criteria, Post search criteria. | |
- Pre search works on server side, like example: ( IsInstalled = 0 and IsHidden = 0 and CategoryIds contains '0fa1201d-4330-4fa8-8ae9-b877473b6441' ) |
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
# Your timezone, https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | |
TZ=America/Chicago | |
# UNIX PUID and PGID, find with: id $USER | |
PUID=1001 | |
PGID=1001 | |
# The directory where data and configuration will be stored Example /docker or /data. | |
ROOT=/data | |
# CONTAINER STUFF |
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
version: "3.4" | |
services: | |
# for PC minecraft | |
minecraft-java: | |
image: itzg/minecraft-server | |
ports: | |
- 25565:25565 | |
volumes: | |
- ${ROOT}/config/minecraft-java:/data | |
environment: |
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 | |
# Backup a Plex database. | |
# Plex Database Location. The trailing slash is | |
# needed and important for rsync. | |
# Change to your value | |
plexDatabase="/data/config/plex/config/Library/Application Support/Plex Media Server/" |
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 | |
# Backup a Plex database. | |
# Plex Database Location. The trailing slash is | |
# needed and important for rsync. | |
read -p "Enter cull path of Plex Directory" plexDatabase | |
name=${plexDatabase:-"/data/config/plex/config/Library/Application Support/Plex Media Server/"} |
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 | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
#prep for media mount | |
apt-get update | |
apt-get install -y nfs-common cifs-utils |