Skip to content

Instantly share code, notes, and snippets.

View rossarioking's full-sized avatar

Rossario King rossarioking

  • Dublin
View GitHub Profile
@rossarioking
rossarioking / Add Tags to a VM in Azure.txt
Created July 27, 2023 10:29
Adding Tags to a VM in Azure
az vm update -g "395-fc169a22-add-remove-and-update-tags-for-resou" -n webvm1 --set tags.MarkForDeletion=Yes
@rossarioking
rossarioking / Create VM with Azure CLI.txt
Created January 19, 2023 20:56
Create VM with Azure CLI
az vm create \
--resource-group learn-eb27549d-6f40-4a1c-852e-edc60ea4e9b8 \
--name my-vm \
--image UbuntuLTS \
--admin-username azureuser \
--generate-ssh-keys
@rossarioking
rossarioking / Bootstrap to Install Apache on Amazon Linux 2
Last active March 28, 2020 20:15
Bootstrap to install Apache on Amazon Linux 2
#!/bin/bash
# Get Root Privilages
sudo su
# Install httpd (Amazon Linux v2)
yum update -y
yum install -y httpd.x86_64
systemctl start httpd.service
@rossarioking
rossarioking / Get-Member.ps1
Created March 7, 2020 18:23
Working with Get-Member Command #PowerShell
# Get-Member - Gets Properties and Methods of Objects - Used to see what makes up an Object.
Get-Service | Get-Member
TypeName: System.Service.ServiceController#StartupType
Name MemberType Definition
---- ---------- ----------
Name AliasProperty Name = ServiceName
@rossarioking
rossarioking / Transcript.ps1
Created March 7, 2020 18:08
Creating PowerShell Transcripts #PowerShell
#Create Folder where transcript files will be saved,
md C:\Transcripts
#This captures all of the console data and outputs it to a transcript file.
Start-Transcript -path .\Transcripts\Mytranscript.txt -append
# All Data inbetween these commands will be written to the trascript file.
#Stops recording Transcript input.
@rossarioking
rossarioking / Get-Commands.ps1
Created March 7, 2020 18:01
Working with PowerShell Get-Commands #PowerShell
#Gets List of Commands Containing "DNS"
Get-Command -Verb Get -Noun *DNS*
CommandType Name Version Source
----------- ---- ------- ------
Alias Get-DnsServerRRL 2.0.0.0 DnsServer
Function Get-DAClientDnsConfiguration 3.0.0.0 RemoteAccess
Function Get-DhcpServerDnsCredential 2.0.0.0 DhcpServer
Function Get-DhcpServerv4DnsSetting 2.0.0.0 DhcpServer
@rossarioking
rossarioking / BasicS3.txt
Last active October 7, 2019 23:16
Working AWS S3 Buckets #AWS
\\Creating an S3 Bucket
aws s3 mb s3://thisismybucket
\\Removing an S3 Bucket
aws s3 rb s3://thisismybucket
\\Removing an S3 Bucket containing files
aws s3 rb s3://thisismybucket --force
\\Copying a local file to an S3 Bucket
@rossarioking
rossarioking / DisableAdminShare.bat
Created October 7, 2019 16:44
Disables Administrative Share on Windows OS. Reboot after running to invoke RegEdit.
Reg Add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters /v AutoShareWks /t REG_DWORD /d 0
@rossarioking
rossarioking / CreateDomainStructure.vbs
Created October 7, 2019 16:41
This Visual Basic Script creates a Basic Organisational Domain Structure. #VBScript
Option Explicit
Dim objDomain,objStudentOu,objCreativeMOU,objGamesOU,objMusicOU,objComputingOU
dim strStudents,strCreativeM,strMusic,strComputing,strGames
strStudents = "ou=Students"
strComputing = "ou=Computing"
strMusic = "ou=Music"
strGames = "ou=Games"
strCreativeM = "ou=CreativeMedia"
@rossarioking
rossarioking / CreateFolderandFiles.vbs
Created October 7, 2019 16:37
Creating Basic Folders and Files with VBScript #VBScript
Option Explicit
Dim objFileSystemObject, objParentFolder, objChildFolder, objFile
'Create an instance of the file System Object
Set objFileSystemObject = CreateObject("Scripting.FileSystemObject")
'Create Monthly report folder (Parent Folder)