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-ADComputersPropertiesAndIPAddresses { | |
[CmdletBinding(DefaultParameterSetName = 'Identification', | |
SupportsShouldProcess = $true, | |
PositionalBinding = $false, | |
HelpUri = 'https://www.github.com/skyhoshi/powershell', | |
ConfirmImpact = 'Medium')] | |
[Alias()] | |
[OutputType([String])] | |
Param | |
( |
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
Public: Github Project. | |
https://github.com/skyhoshi/VHDXToFolders | |
## Story | |
Project Story: (Use Case/ User Story/ My Experience) | |
History of the Project: | |
This project was one of necessity. After 20+ years of collecting, developing and loosing/misplacing projects and source files, When Windows 7 ( + Windows Server 2008) presented the ability to create Virtual Machines. Virtual Hard drives became a standard in storing a lot of “Shared” data. I had virtual hard drives that I would attach and detach from virtual machines to do maintenance and installations. | |
A few years ago with the introduction of Windows 10, Hyper-V and Hyper-V PowerShell Module I was able to script out the creation of Virtual Hard Drives and took the concept of sharing one step further by attaching these drives to folders (Folder Mounting). | |
Theories and Practice: | |
With this I could in theory, install games onto to my SSD drive but when I wasn’t playing the game but needed additional space on the then limited space of my SSD I could dismount a |
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
#if (!(Test-Path -Path )) | |
if ((Read-Host -Prompt "Initialize Profiles?").ToLower() -contains "y") { | |
$HostFile = $PROFILE.AllUsersAllHosts; | |
if (!(Test-Path -Path $HostFile)) { | |
$CreateHost = Read-Host -Prompt "Would you like to create $HostFile" | |
if ($CreateHost.ToLower() -contains "y") { | |
New-Item -ItemType File -Path $HostFile -Force | |
} | |
$CreateHost = "N"; | |
} |
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
Set-ExecutionPolicy -ExecutionPolicy Unrestricted; | |
powershell.exe -NoLogo -NoProfile -Command 'Install-Module -Name PackageManagement -Force -MinimumVersion 2.8.5.201 -Scope CurrentUser -AllowClobber' | |
$ScoopGlobalRoot = "C:\Applications"; | |
$Installers = "$ScoopGlobalRoot\Installers" | |
$env:SCOOP = "$ScoopGlobalRoot\$env:USERNAME\"; | |
$env:SCOOP_GLOBAL = "$ScoopGlobalRoot\Global"; | |
if (!(Test-Path -Path $env:SCOOP)) { | |
New-Item -ItemType Directory $env:SCOOP; | |
} |
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
$AndroidToolPath = "${env:ProgramFiles(x86)}\Android\android-sdk\tools\android.bat" | |
if (!(Test-Path $AndroidToolPath)) { | |
$AndroidToolPath = "$env:localappdata\Android\android-sdk\tools\android.bat" | |
} elseif (!(Test-Path $AndroidToolPath)) { | |
Write-Error "Unable to find Android SDK Manager tools." | |
return | |
} | |
Function Get-AndroidSDKs() { | |
$output = & $AndroidToolPath list sdk --all |
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
public class Output | |
{ | |
private readonly string LogDirPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs"); | |
private static Output _outputSingleton; | |
private static Output OutputSingleton | |
{ | |
get | |
{ | |
if (_outputSingleton == null) |
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
$RootProfileStore = "$($env.USERPROFILE)\.ssh"; | |
$StoreLocation = "\"; | |
$Filename = "NameOfSSHFile" | |
$PrefixFilename = "$(Filename).ssh" | |
$PathOnly = "$RootProfileStore$StoreLocation" | |
if (!(Test-Path -Path $PathOnly)){ | |
New-Item -Path $PathOnly -ItemType Directory; | |
} | |
$Extension = "Id_rsa"; | |
$FileName = "$($PrefixFilename).$($Extension)"; |