Skip to content

Instantly share code, notes, and snippets.

View mhatreabhay's full-sized avatar

Abhay Mhatre mhatreabhay

  • Microsoft Corporation
  • Sammamish WA 98074
View GitHub Profile
cd %ProgramFiles%\Windows Defender
MpCmdRun.exe -removedefinitions -dynamicsignatures
MpCmdRun.exe -SignatureUpdate
#!/usr/bin/env python
"""
SFRP script for Linux vms to install rssh package
"""
import os
import os.path
import imp
import time
import subprocess
@mhatreabhay
mhatreabhay / rssh_2_3_4_4_amd64.sh
Last active February 7, 2019 22:43
script to install rssh_2.3.4-4_amd64 version.
#!/bin/bash
set -e
sleep 120
cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/universe/r/rssh/rssh_2.3.4-4_amd64.deb
dpkg -i rssh_2.3.4-4_amd64.deb
set +e
exit $?
@mhatreabhay
mhatreabhay / linuxManagedDiskSetup.sh
Last active March 27, 2019 05:33
linux managed disk setup
#!/bin/bash
set -e
drive=/dev/sdc1
if [ $(cat /proc/mounts | grep /dev/sdc1 | wc | awk '{print $1}') == 0 ]; then
(echo n; echo p; echo 1; echo ; echo ; echo w) | fdisk /dev/sdc
sleep 5
mkfs -t ext4 /dev/sdc1
elif [ $(blkid $drive -p -o value -s TYPE) != 'ext4' ]; then
@mhatreabhay
mhatreabhay / manageddisksetup.ps1
Last active April 24, 2018 22:19
setup windows managed disk [Drive letter Y]
Get-Disk | `
Where partitionstyle -eq 'raw' | `
Initialize-Disk -PartitionStyle MBR -PassThru | `
New-Partition -UseMaximumSize -DriveLetter Y | `
Format-Volume -FileSystem NTFS -NewFileSystemLabel "datadisk" -Confirm:$false
Exit 0;