Skip to content

Instantly share code, notes, and snippets.

"""Read columns from multiple excel files and perform actions on them"""
import os
import argparse
from collections import Counter
import openpyxl
def cli():
"""Command line interface"""
parser = argparse.ArgumentParser(description="Sum excel files")
r"(\"\"\n)((?!,|\n}|})[\s\S]+?)(\"\")"
@aaronlake
aaronlake / Azure-list-untagged-resources.ps1
Last active October 10, 2018 14:14
Azure: List untagged resources
Write-Host "List all resource where Tag value is not Set"
Write-Host "********************************************"
#Fetch all resource details
$resources = get-AzureRmResource
foreach ($resource in $resources) {
$tagcount = (get-AzureRmResource | where-object {$_.Name -match $resource.Name}).Tags.count
if ($tagcount -eq 0) {
Write-Host "Resource Name - " $resource.Name
Write-Host "Resource Type and RG Name : " $resource.resourcetype " & " $resource.resourcegroupname "`n"
clear
Write-Host This PowerShell script collects Windows system details and outputs to an Excel file. -ForegroundColor yellow
Write-Host `n
Write-Host Prerequisites: -ForegroundColor yellow
Write-Host `n
Write-Host "1) Admin rights on your servers and excel application installed in this local machine." -ForegroundColor yellow
Write-Host "2) MS Office version 2010 or lower need to be installed in the machine you execute this script." -ForegroundColor yellow
Write-Host `n
Write-Host "If you dont have the prerequisites, please cancel this script by closing this window and run it when you have all the prerequisites." -ForegroundColor yellow
Write-Host `n
# Beginning script
# Section 1 – vCenter Server settings
$vcentertocollectstatsfrom = “192.168.1.101”
$vcenterusername = “root”
$vcenterpassword = “P@ssw0rd”
# Section 2 – Collection time frame
$noofdaystocollect = “7”
# Section 3 – CSV Output filename and directory
$csvoutput = “C:\scriptoutput\ZertoOutput.csv”
# Nothing to edit below this line
@aaronlake
aaronlake / Get-SystemInfo.ps1
Last active March 14, 2016 18:10
Get Windows system information
$Computers = "localhost anotherhost01 yetanother01"
Clear-Host
foreach ($Computer in $Computers)
{
$computerSystem = get-wmiobject Win32_ComputerSystem -Computer $Computer
$computerBIOS = get-wmiobject Win32_BIOS -Computer $Computer
$computerOS = get-wmiobject Win32_OperatingSystem -Computer $Computer
$computerCPU = get-wmiobject Win32_Processor -Computer $Computer
$computerHDD = Get-WmiObject Win32_LogicalDisk -ComputerName $Computer -Filter drivetype=3
accounts-base@1.2.0
accounts-password@1.1.0
aldeed:autoform@5.1.1
aldeed:collection2@2.3.2
aldeed:delete-button@1.0.0
aldeed:simple-schema@1.3.0
aldeed:tabular@1.0.4
autoupdate@1.2.0
base64@1.0.3
binary-heap@1.0.3
@aaronlake
aaronlake / VNXe_Backup.ps1
Created March 6, 2015 17:38
VNXe Backup Script
#################################
#
# Reference: VNXe UEMCLI Docs
# Script:VNXe BACKUPS
# Date: 2015-02-10 17:30:00
#
# Version Update:
# 1.0 David Ring
#
#################################
############################
#
# Reference: VNX CLI Docs
# Script: VNX BACKUPS
#
# Date: 2015-01-23 14:30:00
#
# Version Update:
# 1.0 David Ring
#
@aaronlake
aaronlake / extReserved.py
Created February 24, 2015 19:32
Change ext3, ext4 file system reserved blocks to 1%
#!/usr/bin/python
import subprocess
import sys
import re
version = '1.0'
# Quit if no server specifed
if len(sys.argv) == 1:
print "Usage: fixtune2fs.py <servername>"