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-OSProductType { | |
[CmdletBinding(SupportsShouldProcess=$True,DefaultParameterSetName="None")] | |
PARAM( | |
[Parameter(Mandatory = $false, Position = 0, ValueFromPipeline = $true)] | |
[string]$ComputerName = $env:COMPUTERNAME | |
) | |
<# | |
.SYNOPSIS | |
Get the operating system product type. | |
.DESCRIPTION |
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
def yes_or_no(question): | |
reply = str(raw_input(question+' (y/n): ')).lower().strip() | |
if reply[0] == 'y': | |
return True | |
if reply[0] == 'n': | |
return False | |
else: | |
return yes_or_no("Uhhhh... please enter ") |