Skip to content

Instantly share code, notes, and snippets.

View RamaTam's full-sized avatar
🏠
Working from home

RamaTam

🏠
Working from home
View GitHub Profile
@RamaTam
RamaTam / README.md
Created June 24, 2021 23:34 — forked from magnetikonline/README.md
Reset Windows 2012R2 local administrator password.

Reset Windows 2012R2 local administrator password

  • Boot from Microsoft Windows Server 2012R2 DVD/ISO.
  • From the Windows Setup menu, click "Next".
  • Select "Repair your computer".
  • Click on "Troubleshoot".
  • Under Advanced options, click "Command Prompt".

At the command prompt, run the following commands:

@RamaTam
RamaTam / toybox_v1.0.0.tests.ps1
Created June 22, 2021 15:14 — forked from exospheredata/toybox_v1.0.0.tests.ps1
Example Pester test for a PowerShell v5 Class
# Begin Testing
try
{
InModuleScope -ModuleName ToyBox -ScriptBlock {
Function Set-ObjectMockProperties ($object,[switch]$Exists)
{
# This function will load the object and set the global script variables with the values supplied.
# By doing this, we can later easily change how we interact with the object and make edits along
# the way in other Mocks or Tests.
@RamaTam
RamaTam / self-signed-certificate-with-custom-ca.md
Created January 20, 2021 01:26 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@RamaTam
RamaTam / autounattend.xml
Created January 10, 2021 01:40 — forked from chrisoldwood/autounattend.xml
Example Packer configuration files for creating a Windows 10 VM on QEMU/KVM/libvirt.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<SystemLocale>en-US</SystemLocale>
@RamaTam
RamaTam / Configure-SecureWinRM.ps1
Created December 24, 2020 00:12 — forked from bender-the-greatest/Configure-SecureWinRM.ps1
Configure WinRM to listen over SSL (port 5986) and use the web certificate generated by a certificate templated called 'WinRM'. Highly recommend reading Synopsis, Description, and Examples.
<#
.SYNOPSIS
Configures a secure WinRM listener over HTTPS to enable
SSL-based WinRM communications. This script has not been
tested on Windows Server 2003R2 or earier, and may not
work on these OSes for a variety of reasons.
If Windows Remote Management is disabled (e.g. service
stopped, GPO Policy, etc.), this script will likely fail.
.DESCRIPTION
@RamaTam
RamaTam / springer-free-maths-books.md
Created May 16, 2020 01:05 — forked from jnpaulson/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links