My PowerShell Scripts - Systems Administration

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
there's a few scripts that I use at work that come in very handy and what I did is I actually bumped them into one script and saved it as a module and the only thing you have to do is change the file extension from PS 1 to PS m 1 to make it a module and then what I do is in my pull file I just import this module and so let's go ahead and take a look at what's in this module now you'll notice they're individual functions and that's all you got to do is create individual functions and this is kind of just like my storage script or storage area where I store all these functions that I I use frequently and that I want to have available within the shell every time it launches the first one now this one I'll be honest with you I don't use it much but I did I saw it on I don't remember whose blog it was but maybe was Don Jones or something but I thought it was pretty neat and I do find myself using it every once in a while and all it is is a quick little ping script now to me it's kind of quicker just to type ping because I'm so used to it but you know it's kind of neat to to see it and but you know what I don't think I have this function and I just named it the letter P I don't think I have this I don't have I don't think I've imported this module yet so let's test it if I just do P and then google.com well it does work so I do have it imported so disregard so it's just basically saying true it's paintable now if we try to paint something else it's false so that's all that one does now the next one here this one I use all the time at work this is probably my number one script that I use or a function that I use I just called it get logged in and all it does basically is gets or retrieves the user that's currently logged into the remote computer now I don't have a remote computer here to test with but I can just do it on this local machine so if we do get - logged in and tab completion works and I'm just gonna put in localhost here's where you would just normally put in the remote computer name hit enter and it says the computer name and who's logged into it now for instance we want to do multiple computers at once all you gotta do is put a comma I'll just put one and it'll just go down the list I find this very useful especially at work where we have thousands of computers and different users and I just need to see who's logged into a computer really quick so the next one is getup time now I do use this one quite frequently too you know I have some users ask him have you have you restarted computer and they'll say yeah and then I'll double check it real quick and they turns out they haven't this one just goes and lets you know how long the computer's been up so it's clear this if we do get - uptime and then you can put in your computer name for instance here we'll just do localhost tells you how many days the computer name eight seconds the minutes and hours that one comes in pretty handy - and this last one it's provided via one of the system admins at work I'm not sure if he wrote it or or I got it somewhere or whatnot but this one comes in handy if you want to check like what drivers are installed and maybe when the drivers were installed for a particular piece of hardware now if you just run it by itself without a parameter so let's just do get hardware version it's built nope we need a computer name on this one so we're just gonna do localhost so that's gonna go through grab all the information about all the hardware and you know that's a lot of reading and all this stuff but let's just break it down to let's say we just want stuff that's related to the name or that contains the name Intel for like the NIC card or something or the CPU so here you can see we got a gigabit network card the driver date was 229 2012 and the driver version so this comes in handy if you're trying to figure out what computers have what versions of what driver and when they were installed and all that stuff so this one this one comes in pretty pretty handy now all these scripts are going to be available I'm gonna make them available on the site so check out PC XCOM and there should be a link in the description under this video on the YouTube page so alright guys hopefully you found this helpful and if you have any tips for you know what you would like to see in this kind of a module or tips to make these scripts better please don't hesitate to let us know
Info
Channel: PC-Addicts
Views: 132,478
Rating: 4.9340258 out of 5
Keywords: computer tips, computer tips & tricks, support, hacks, chat, system administration, powershell, pc-addicts, tech, scripts, tips, tricks, system administrator, live, automation
Id: U7oN_C7jDFM
Channel Id: undefined
Length: 4min 36sec (276 seconds)
Published: Thu Jan 24 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.