In this case, I have a module that contains utility code, and this is where the function would reside. When I have a function, I tend to add it to my profile somewhere. But anything that I do on a regular basis becomes an immediate candidate for a Windows PowerShell function. With Windows PowerShell, it can be a one-line command. And in the end, it would have required about 18 lines of code. In the VBScript days, it would have taken me nearly 30 minutes to write out a WMI script to send a test page to a printer. The cool thing about WMI since Windows PowerShell 3.0 is that with the CIM cmdlets, using WMI is simple. The class is Win32_Printer…talk about backwards compatibility. The WMI class I need to use is the same WMI class that I used way back in the days of Windows NT 4.0. This is because Windows Management Instrumentation (WMI) has always had a print test page method for the printer class. Even 15 years ago in the old VBScript days, I could print a test page. I have always been able to print a test page from within a script. How hard is that? As it turns out, it is not very hard at all. Instead, I simply want to use Windows PowerShell to print a test page. But dude, I do not want to have to mouse around, open Control Panel, find the printer tool, and scramble until I find the print test page button. The operative word, however, is nearly.Īfter I add a printer, I like to print a test page-especially if I am going to be printing something important (which I believe, should be the only documents printed). I can do nearly everything I need to do to manage printers. I have absolutely fallen in love with this tea.Īnyway, something else I have fallen in love with is all the printer cmdlets available in Windows PowerShell on Windows 8.1. That orange candy-covered vanilla ice cream was just the thing for hot, humid days when I was growing up in Florida. It smells wonderful, and it tastes just like a Dreamcicle that I used to eat when I was a kid. This morning I am sipping an awesome orange-cream tea that I picked up at a tea shop in Leipzig, Germany. Microsoft Scripting Guy, Ed Wilson, is here. Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to send a test page to a printer.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |