Coonich Technologies Blog

Last modified by Dennis Coonich on 2017/11/03 21:23

Sep 22 2015

Using PowerShell 2 and Windows 7 in a Community College - "Disable-RemotePsRemoting.ps1"

When you simply need to disable PowerShell remoting remotely.   PowerShell remoting allows managing remote computers via PowerShell.  ...

Using PowerShell 2 and Windows 7 in a Community College - "Enable-RemotePsRemoting.ps1"

    When you simply need to enable PowerShell remoting remotely.   PowerShell remoting allows managing remote computers via PowerShell.  ...

Using PowerShell 2 and Windows 7 in a Community College - "Get-FailingDrive.ps1"

    From another blog - I noticed a link to an article on twitter yesterday that talked about how you can use PowerShell to query for a SMART enabled hard drive and detect a possible imminent failure. It was an interesting article and showed me something I didn’t know regarding detecting a potential failure on a drive. ...

Sep 10 2015

Using PowerShell 2 and Windows 7 in a Community College - "Get-RestartHistory.ps1"

    Shows how to build output that contains the restart history of local or remote computer(s).  This a a good starting point covering advanced PowerShell features that lays the foundation for future scripts.  Also shows how to incorporate documentation into the script. ...

Aug 28 2015

Using PowerShell 2 and Windows 7 in a Community College - "Get-IP.ps1"

To diagnose network related issues on workstation, one of the first steps is to look at the workstations networking details.  This code shows how to gather those network details. ...

Using PowerShell 2 and Windows 7 in a Community College - "Get-InstallDate.ps1"

Very simple script that gathers install dates from one or many computers. ...

Aug 27 2015

Using PowerShell 2 and Windows 7 in a Community College - "Logoff-Computer.ps1"

This is a simple advanced cmdlet() and is a good foundation for more complex processing. ...

Aug 20 2015

Using PowerShell 2 and Windows 7 in a Community College - "OS Info.ps1"

A simple script to gather basic operating system information.  Basically the same design as the script in the previous blog: Using PowerShell 2 and Windows 7 in a Community College - "PC Serial Number.ps1" ...

Aug 18 2015

Using PowerShell 2 and Windows 7 in a Community College - "PC Serial Number.ps1"

A basic script to gather a computer's serial number. ...

Using PowerShell 2 and Windows 7 in a Community College

This is my first blog series and I am going to start it out covering how I have used PowerShell 2 for years at a community college.  

I initially delved into PowerShell because I wanted to remotely manage and solve various aspects of remote computers on my campus.  

My first solution was non PowerShell.  It was a java application written from scratch that made extensive use of Sysinternals and windows tools.  I could have continued further in Java and may in the future but I read up on PowerShell and was fairly impressed.  

As I poked more PowerShell code, I grew to like it.  As time went on I crafted many many scripts, some very basic to very complex.  So I had this hodgepodge library of scripts and it dawned on me that it would be cool to collect them under a menu based master script.  

I initially hastily crafted a menu script that launched other PoweShell  scripts.  It was number based so simply typing in a number would call the script.  It works.  Its lean and mean and being a script it is modifiable.  It is primitive.  But ever so useful.

I then crafted a different kind of menu script, where it had many sub-menus, easily extendable for more sub-menus, and selecting a function was a matter of navigating with the arrow keys and hitting enter.  I also created a menu creator script that created the initial menus based on the scripts it recursively found in sub-directories.  All this info was stored in XML files so extending was a matter of creating ir using a subdirectory, placing the script in it, and then updating the XML.  No modification of menu code.  Very nice. 

I find I use both versions on the the menuing system.   I'm torn on which is better.  Both are fun to use and modify.

MenuNumbered.png

MenuArrowed.png

So here I am, hundreds of scripts, two menu systems to drive the scripts and I have not shared any of this out in the world.

I intend to change that with this blog series.  I will be going over my scripts and posting there code for others to learn from and use.   I have used and scraped code and algorithms from many many people and failed to comment my coding appropriately.   So if you see something that is yours, contact me.  Let me know how I can give proper credit or if you choose, I will remove code as needed.

Tags:
Created by Administrator on 2005/01/28 09:50
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 7.1.1 - Documentation