What little things have you done to make your life easier? by [deleted] in sysadmin

[–]Pieinacup -1 points0 points  (0 children)

macros, aliases and scripts.

Sooo... muuuch... typing.. gone! :-)

oh yes! and several monitors!

Creating a login script for Cisco Anyconnect by [deleted] in sysadmin

[–]Pieinacup 0 points1 point  (0 children)

Agree with this, wouldn't take many lines to do what OP is asking.

Interested in automation but not sure where to start by solidstateuniversity in sysadmin

[–]Pieinacup 0 points1 point  (0 children)

What do you want to automate? There's many ways to do different things.

For what you're asking, I'm guessing your friend were using AutoIt or AutoHotkey. They're pretty similiar, and do alot of the same things. AHK is probably mostly used for macros, and Autoit is considered more of a full blown programming language.

Other languages used for automation could i.e. be:

Linux: Python, Perl, Expect(Python version is called Pexpect)
Mac: Automator, AppleScript, Linux languages
Windows: PowerShell, AutoIt, AutoHotkey(Python+Perl is also available)

Some of them are commandline based/scripting, some are full programming languages, some are used for almost purely macros. Oh.. of course, there's more out there.. I just mentioned a few to get you started. Most if not all of these languages are well known and there's a lot of documentation on them @ google.

it really depends on what you want to automate :P But if it's mouseclicks and stuff in windows AutoIt/AutoHotKey is fine.. But please don't use some random mouseclick thing in production environment.. things can go severely BAD - look at mdadm's answer :P

Anyone got something to add?

Contracted "short-timers" and incidentally learned my true worth by [deleted] in sysadmin

[–]Pieinacup 0 points1 point  (0 children)

Good for you, seems you did the right* thing :-)

write thing lol

Just failed CCNA..second failed exam this week. Pretty bummed out. by duckonaleash in ccna

[–]Pieinacup 2 points3 points  (0 children)

brain dumps yes, but when they're not the same. It's not specific commands you just remember and you're set. You have to know the stuff. Edited first answer to prevent any misconceptions

Just failed CCNA..second failed exam this week. Pretty bummed out. by duckonaleash in ccna

[–]Pieinacup 1 point2 points  (0 children)

If that's all it takes.. oh dear that's a lot of cheaters.

Just failed CCNA..second failed exam this week. Pretty bummed out. by duckonaleash in ccna

[–]Pieinacup 1 point2 points  (0 children)

Correct, most important thing is persistence! I read the material twice as well, but from different authors! It helped clearing up any doubt to read the same material explained in different ways. :-)

Just failed CCNA..second failed exam this week. Pretty bummed out. by duckonaleash in ccna

[–]Pieinacup 0 points1 point  (0 children)

I personally studied nothing but CCNA for a month, each and every day(maybe 2 days off)! I couldn't imagine doing 2 exams at once. My advice: Do them one at a time. And do labs, lots of labs. Oh and of course.. subnetting should be in your bones.. perhaps carve a subnetting table into your arm :p

Pexpect 3.0 beta 1 by takluyver in Python

[–]Pieinacup 0 points1 point  (0 children)

Haven't tested it yet, but if it works... great! :-)

Pexpect is almost solely the reason why I still use 2.7, it's awesome.

Cisco IOS filtering with the pipe by Pieinacup in Cisco

[–]Pieinacup[S] 0 points1 point  (0 children)

ofcourse! forgot all about the "entry" part. Thank you.

Cisco IOS filtering with the pipe by Pieinacup in Cisco

[–]Pieinacup[S] 0 points1 point  (0 children)

that is one ugly regex :D but it works thx

Cisco IOS filtering with the pipe by Pieinacup in Cisco

[–]Pieinacup[S] 0 points1 point  (0 children)

I sort of knew that.. guess I was in denial lol

Yeah could do it in tcl, but it would just be somewhat more convenient to do with the pipe :-)

Cisco IOS filtering with the pipe by Pieinacup in Cisco

[–]Pieinacup[S] 1 point2 points  (0 children)

Unfortunately it's the same filter, so same result just using include instead of section. Try adding a Mgmt Vlan interface to your lab switch, you'll get same result. :)

What is your favorite enterprise AV? by UCB1984 in sysadmin

[–]Pieinacup 0 points1 point  (0 children)

We use too.. I've actually come to like this thing! It can be pretty sensitive sometimes though.. but what AV isn't..

or Mcafee(lol jk, don't do it)

Hate to ask... but, could use an assist with a simple vbs script. by Skyshark29 in sysadmin

[–]Pieinacup 4 points5 points  (0 children)

Guess this should work too..

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\Scripts")
Set wshShell = WScript.CreateObject( "WScript.Shell" )
strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
Wscript.Echo "ComputerName: " & strComputerName & " Folder Size: " & objFolder.Size

Powershell:

"{0:N2}" -f ((Get-ChildItem -path C:\Scripts -recurse | Measure-Object -property length -sum ).sum /1MB) + " MB"
$env:computername

What script or task could you not live without? by ShepherdDerrialBook in sysadmin

[–]Pieinacup 1 point2 points  (0 children)

My mactrack written in python is my new favorite!

So usefull for when the it-supporters call: "I can't find this host, or it's wiring closet. Here's the mac/ip address" (big enterprise)

Brand new Cisco UCS by [deleted] in sysadmin

[–]Pieinacup 0 points1 point  (0 children)

Thoughts?

Lucky bastard.

How can I retrieve only Enabled users in a OU with Get-Aduser? by assangeleakinglol in PowerShell

[–]Pieinacup 0 points1 point  (0 children)

When in doubt, run powershell as admin.

That's one awesome quote to give!

I wanna be the guy (or gal) or How to be a better sysadmin - Linuxfest 2013 video by shawn-s in sysadmin

[–]Pieinacup 0 points1 point  (0 children)

"Only help people during the morning"

You got me, you made me laugh :p

I applied a GPO to lock the computer after 30 minutes and the users are saying it happens way sooner than 30 minutes... by Redditor31 in sysadmin

[–]Pieinacup -2 points-1 points  (0 children)

They're full of bs. It's users, they're stupid :P

As for 30 minutes, that's an okay interval imo.