Skip to content

Instantly share code, notes, and snippets.

Kevin Kirkpatrick vScripter

Block or report user

Report or block vScripter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Worklog-Module-5.ps1
PROCESS {
if (Test-Path -LiteralPath $filePath) {
if ($Indent) {
$indentMessage = $(Add-Indent -Level $Indent) + $Message
Write-Verbose -Message 'Adding message to Work Log'
Write-Output -InputObject $indentMessage | Out-File $filePath -Append
View Worklog-Module-4.ps1
BEGIN {
$now = Get-Date
$dateFormat = $now.tostring('yyyyMMdd')
$dateDay = $now.tostring('dddd')
$fileName = $dateFormat + '_' + $dateDay + '_' + 'WL.md'
$filePath = Join-Path $Path $fileName
$nowLong = $now.tostring('D')
function Add-Indent {
View Worklog-Module-3.ps1
function Add-WorkLog {
[cmdletbinding()]
param (
[parameter(Mandatory = $true,
Position = 0)]
[System.String]$Message,
[parameter(Mandatory = $false,
Position = 1)]
View Worklog-Module-2.ps1
PROCESS {
if (-not (Test-Path -LiteralPath $filePath -PathType Leaf)) {
try {
Write-Verbose -Message 'Creating worklog file'
New-Item -Path $filePath -Type File -ErrorAction 'Stop' | Out-Null
Write-Verbose -Message 'Adding message to Work Log'
View Worklog-Module-1.ps1
BEGIN {
$now = Get-Date
$dateFormat = $now.tostring('yyyyMMdd')
$dateDay = $now.tostring('dddd')
$fileName = $dateFormat + '_' + $dateDay + '_' + 'WL.md'
$filePath = Join-Path $Path $fileName
$nowLong = $now.tostring('D')
} # end BEGIN block
View Worklog-Module-0.ps1
function New-WorkLog {
[cmdletbinding()]
param (
[parameter(Mandatory = $false)]
[System.String]$Path = "$ENV:USERPROFILE\Documents\GitHub\WorkLog"
)
View Backup ESXi with PowerCLI.ps1
# created: 2013-01-28
$params = {
VMHost = 'esxi01.devlab.local'
BackupConfiguration = $true
DestinationPath = 'c:\hostconfigs\esxi01'
}
Get-VMHostFirmware @params
View Keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

View HTML Disk Space Report.ps1
<#
HTML Server Disk Usage Report Script
Kevin Kirkpatrick
nullzero.io
Created 7/31/2013
This report, as currently written, is meant to create and save the HTML report in a location of your Choosing.
If attaching the HTML report is desired, edit the EMail settings attachemtn location variable and go to the
bottom of the script and un-comment the attachment options.
#>
@vScripter
vScripter / Get-VMDetails.ps1
Created Apr 4, 2017
Returns more detailed statistics and configuration for a single or multiple VMs
View Get-VMDetails.ps1
function Get-VMDetails {
<#
.SYNOPSIS
Returns more detailed statistics and configuration for a single or multiple VMs
.DESCRIPTION
Returns more detailed statistics and configuration for a single or multiple VMs
This function assumes that you are already connected to one, or more, vCenter Servers.
You can’t perform that action at this time.