Skip to content

Instantly share code, notes, and snippets.

View grantcarthew's full-sized avatar
🙂
Coding

Grant Carthew grantcarthew

🙂
Coding
View GitHub Profile
@grantcarthew
grantcarthew / Test-SSD.ps1
Last active November 5, 2019 05:13
PowerShell script to test if a hard disk is an Solid State Disk (SSD) or not.
<#
.SYNOPSIS
Detects if the passed Physical Disk Id is a Solid State Disk (SSD) or a
spindle disk. Returns true for an SSD and false for anything else.
.DESCRIPTION
Use Get-PhysicalDisk to get the Physical Disk Ids for the system you wish
to test. This script supports values being passed throught the pipeline.
The methods used for detecting are by reading the Nominal Media Rotation

#Create bitbucket branch

##Create local branch

$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
  master
* sync
@grantcarthew
grantcarthew / BaseBoxstarter
Last active October 24, 2016 01:41
Base Image Bootstrap Script for Boxstarter.
Update-ExecutionPolicy -Policy Unrestricted
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableExpandToOpenFolder -EnableShowFullPathInTitleBar -EnableOpenFileExplorerToQuickAccess -EnableShowRecentFilesInQuickAccess -EnableShowFrequentFoldersInQuickAccess
Set-StartScreenOptions -EnableBootToDesktop
Set-TaskbarOptions -Combine Never
Enable-RemoteDesktop
Disable-InternetExplorerESC
Disable-UAC
Disable-BingSearch
Disable-GameBarTips
@grantcarthew
grantcarthew / Initialize-SPWeb.ps1
Last active December 25, 2015 15:59
Invokes a standard web request against all the sites in SharePoint. http://uglygizmo.blogspot.com.au/
<#
.Synopsis
Invokes a standard web request against all the sites in SharePoint.
.Description
There are some dependencies to run this script as follows;
The account used to run this script will need read access to all
sites for the initialization to fully succeed.
@grantcarthew
grantcarthew / Get-ActiveIP.ps1
Created October 16, 2013 00:16
Determine the active IP address on a Windows machine with PowerShell. http://uglygizmo.blogspot.com.au/
<#
.Synopsis
Returns IPv4 address details for the local machine.
Information is gathered from the active interface being used by the default route.
#>
[CmdletBinding()]
[OutputType([string])]
Param ()
Write-Verbose -Message ("Begin: " + $MyInvocation.MyCommand.Path)
@grantcarthew
grantcarthew / Connect-Telnet.ps1
Last active June 1, 2022 13:48
A full graceful telnet client using PowerShell and the .NET Framework. http://uglygizmo.blogspot.com.au/
<#
.SYNOPSIS
A full graceful telnet client using PowerShell and the .NET Framework.
.DESCRIPTION
This script was made with a view of using it to have full control over the text
stream for automating Cisco router and switch configurations.
.PARAMETER TelnetHost
The address of the server or router hosting the telnet service.