109 lines
3.7 KiB
PowerShell
109 lines
3.7 KiB
PowerShell
<#
|
|
.NOTES
|
|
===========================================================================
|
|
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2020 v5.7.172
|
|
Created on: 9/30/2021 5:47 PM
|
|
Created by: dcmarquardt
|
|
Organization: inCrypto Software
|
|
Filename: Write-Disclaimer.ps1
|
|
===========================================================================
|
|
.DESCRIPTION
|
|
A description of the file.
|
|
#>
|
|
|
|
|
|
<#
|
|
.NOTES
|
|
===========================================================================
|
|
Created on: 9/30/2021 4:26 PM
|
|
Created by: dcmarquardt
|
|
Organization: inCrypto Software
|
|
Filename: win10-debloatifier.ps1
|
|
===========================================================================
|
|
.DESCRIPTION
|
|
Removes all of the crapware and silences (most of) Microsoft's telemetry.
|
|
#>
|
|
|
|
function Write-WarningToConsole
|
|
{
|
|
<#
|
|
.SYNOPSIS
|
|
Writes out WARNING in ASCII
|
|
|
|
.DESCRIPTION
|
|
A detailed description of the Write-WarningToConsole function.
|
|
|
|
.EXAMPLE
|
|
PS C:\> Write-WarningToConsole
|
|
|
|
.NOTES
|
|
Additional information about the function.
|
|
#>
|
|
[CmdletBinding()]
|
|
param ()
|
|
|
|
Write-Host "######## ######## ######## ######## ######## ######## ######## " -ForegroundColor Red
|
|
Write-Host "# ### ### ### # ## # ## # ## ## # ## # ## ## " -ForegroundColor Red
|
|
Write-Host "# ### ## ## # ## # # # # ### ### # # # # ## # " -ForegroundColor Red
|
|
Write-Host "# # # # ## # # ## # # # ### ### # # # ##### " -ForegroundColor Red
|
|
Write-Host "# # # # ## # # ### ### # # # # # " -ForegroundColor Red
|
|
Write-Host "# # # ## # # # ## # # # ### ### # # # # ## # " -ForegroundColor Red
|
|
Write-Host "# ### # ## # # ## # # ## # ## ## # ## # ## ## " -ForegroundColor Red
|
|
Write-Host "######## ######## ######## ######## ######## ######## ######## " -ForegroundColor Red
|
|
Write-Host " " -ForegroundColor Red
|
|
Write-Host " PLEASE READ CAREFULLY! " -ForegroundColor Red
|
|
Write-Host " This program makes changes to your computer. I tested it " -ForegroundColor Red
|
|
Write-Host " a whole bunch and it didn't break anything on my computers. " -ForegroundColor Red
|
|
Write-Host " " -ForegroundColor Red
|
|
Write-Host " If it breaks something on your computer, I take no " -ForegroundColor Red
|
|
Write-Host " responsibility whatsoever. This warning is to cover my ass " -ForegroundColor Red
|
|
Write-Host " in the event your computer starts on fire and starts clucking " -ForegroundColor Red
|
|
Write-Host " like a chicken. Good luck mighty hero! " -ForegroundColor Red
|
|
Write-Host "---------------------------------------------------------------" -ForegroundColor Red
|
|
Write-Host " Now that the ominous warnings are out of they way, shall we " -ForegroundColor Yellow
|
|
Write-Host " proceed? " -ForegroundColor Yellow
|
|
}
|
|
|
|
function Get-YesNoInput
|
|
{
|
|
<#
|
|
.SYNOPSIS
|
|
Prompts the user for a y/n answer and returns true for yes, false for no
|
|
|
|
.DESCRIPTION
|
|
Asks the user whatever is passed in -PROMPT and returns true/false
|
|
|
|
.EXAMPLE
|
|
PS C:\> Get-YesNoInput -PROMPT "Do stuff?"
|
|
|
|
.NOTES
|
|
Additional information about the function.
|
|
#>
|
|
[CmdletBinding()]
|
|
[OutputType([boolean])]
|
|
param
|
|
(
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$PROMPT
|
|
)
|
|
|
|
while ($True)
|
|
{
|
|
$ANS = Read-Host $PROMPT
|
|
if ($ANS -eq 'y' -or $ANS -eq 'yes')
|
|
{
|
|
return $true
|
|
break
|
|
}
|
|
If ($ANS -eq 'n' -or $ANS -eq 'no')
|
|
{
|
|
return $false
|
|
break
|
|
}
|
|
}
|
|
}
|
|
|
|
Write-WarningToConsole
|
|
Get-YesNoInput -PROMPT "Y or N"
|
|
|