Skip to content

Instantly share code, notes, and snippets.

RIKIKU

Block or report user

Report or block RIKIKU

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
@RIKIKU
RIKIKU / CleanWindowsUpdate.ps1
Last active Aug 31, 2017
Cleans the Windows Update download directory.
View CleanWindowsUpdate.ps1
stop-service wuauserv -ErrorAction Stop
Get-ChildItem "$env:windir\SoftwareDistribution" | Remove-Item -Recurse -Force
start-service wuauserv
View Connect-RDPComputers.ps1
<#
.Synopsis
Opens a new RDP connection to a specified computer using the given credentials.
.DESCRIPTION
Give this thing an array of computer names and a credential to connect to them on and it will open up an RDP session and log you into all of them.
This is great for when you have a huge list of computers that you need to remote into.
.EXAMPLE
$cred = get-credential
$ListOfComputerNames = "Server1","Server2","Server3"
@RIKIKU
RIKIKU / Add-MAMLHelpParameter.ps1
Last active Jul 30, 2017
Add a parameter to a MAML help file.
View Add-MAMLHelpParameter.ps1
<#
.Synopsis
Adds a parameter to an existing, fully formatted help file.
.DESCRIPTION
This thing just looks for your cmdlet name, clones the first existing parameter and appends it to the bottom of the list of parameters for your cmdlet.
.EXAMPLE
Add-HelpParameter -Path "C:\We've\all seen a \Filepath\before-Hlep.xml" -CmdletName New-Shiney -ParameterName "TurboShiney" -Position 1 -TyepName "String" -TypeFullName "System.String"
#>
function Add-HelpParameter
{
@RIKIKU
RIKIKU / AzureExpiredCertCleaner.ps1
Created Jan 30, 2017
Remove expired SSL certificates
View AzureExpiredCertCleaner.ps1
Login-AzureRmAccount -TenantId "InsertTennantIdHere"
Get-AzureRmSubscription -SubscriptionId "InsertSubscriptionIdHere" | Select-AzureRmSubscription
$certificates = Get-AzureRmResource -ExpandProperties | where ResourceType -EQ Microsoft.Web/certificates #This part takes ages to run.
foreach ($certificate in $certificates)
{
if((get-date $certificate.Properties.expirationDate) -le (Get-Date) )
{
Remove-AzureRmResource -ResourceName $certificate.ResourceName -ResourceType $certificate.ResourceType -ResourceGroupName $certificate.ResourceGroupName -Verbose -Confirm:$false -Force
View Dyn365OClientPrereq.ps1
#This is a script to automatically download and create the folders for the residtributables needed to install CRM 2016.
#V1.0.0
do{[int]$bitness = Read-Host "What bitness the installed version of Office e.g. 32,64"}
while(!($bitness -eq 32) -xor ($bitness -eq 64))
Add-Type -AssemblyName System.Windows.Forms
#get the source DIR.
$SourceDIRDLG = New-Object Windows.Forms.FolderBrowserDialog
You can’t perform that action at this time.