Apr 08, 2014
Today, I’m going to go into a little more detail with a topic I’ve previously covered, that is, scripting. There have been a few blog posts about PowerShell and I very strongly suggest that it be a topic worthy of your study. Well, how about a little more meat on those bones? Windows PowerShell is a fully developed, object-based scripting language. It is built on the .NET Framework, and has been designed for IT professionals who may not have any experience in scripting, but are still required to control and manage the administration of the Windows operating system and applications that run on Windows. Many command shells, including cmd.exe and certain UNIX shells, operate by executing a command or utility in a new process and presenting the results to the user as text. For this reason, many text processing utilities have been created to support this interaction. You might think of sed, AWK or Perl for example. These shells, such as BASH, have commands built into the shell process. There have been many shell specific utilities created (squillions in fact). Windows PowerShell is very different (of course, it is). It doesn’t process text; it processes objects that are based on the .NET Framework. Like other shells, it comes with a large set of built-in commands, or cmdlets as they’re called. Unlike traditional shells, where the commands range from the very simple (attrib.exe) to the very complex (netsh.exe), Windows PowerShell cmdlets are all very simple. They are single-function command-line tools built into the shell. You can use the cmdlets individually or you can combine them to perform complex tasks. A tremendous feature of Windows PowerShell is its extensibility. PowerShell ships with many built-in modules, but you can install additional modules as required. Modules can be in one of two states: loaded or unloaded. In order to access the cmdlets of a particular module you must, of course, load the module. You can easily view the modules that have been loaded by using the Get-Module command. If the module you want is not loaded, you will use Import-Module to load it. Simple! To add SQL Server functionality to Windows PowerShell, SQL Server 2014 includes the SQLPS module. As we’ve just discussed, it’s a simple matter to import the module into Windows PowerShell to add the SQL Server components. The SQLPS module includes:- A SQL Server Provider that enables a simple navigation mechanism similar to the paths in the file system. You can even use familiar tools like cd, dir, ren and del (does anyone even remember those old-school DOS commands?)
- A set of SQL Server cmdlets to support a vast array of actions such as running a sqlcmd script that contains Transact-SQL or even XQuery statements.
How do your Excel skills stack up?
Test NowNext up:
- How to import public holidays into Microsoft Project 2010 calendar
- Dual boot Windows 8.1 on Windows 7 using Virtual Hard Disk (VHD)
- Strategies to sell human services (Part 2)
- ‘Revise Contents’ – Outlook’s hidden gem
- Designing Exchange Server 2013 Unified Messaging Integration with Lync Server 2013
- They won’t take their shoes off!
- Insert an online video into Word 2013
- Have an eggsellent Easter!
- PowerShell is for infrastructure types…right.
- A new manager’s first conversations
Previously
- How to create a custom theme in Office 2013
- Configure Windows Intune for SCCM 2012 R2 – Part 2
- Anatomy of a coach
- Merge layers without flattening in Photoshop
- SQL Server 2014: Now how do I get certified?
- Enhance your presentations with PowerPoint’s Slide Zoom
- Configure Windows Intune for SCCM 2012 R2 – Part 1
- How to convert text to columns in Microsoft Excel
- And if you tell that to the young folks today…
- Creating a drop-down list in Microsoft Excel