background preloader

Powershell collection

Facebook Twitter

This is my research and development of Powershell scripts.


Getting to Know ForEach and ForEach-Object – Hey, Scripting Guy! Blog. Summary: Learn the differences between ForEach and ForEach-Object in Windows PowerShell.

Getting to Know ForEach and ForEach-Object – Hey, Scripting Guy! Blog

Honorary Scripting Guy and Windows PowerShell MVP, Boe Prox, here today filling in for my good friend, The Scripting Guy. Today I am going to talk about some differences between using ForEach and using ForEach-Object in day-to-day scripting activities. There are times when you are unable to make use of a cmdlet that has built-in pipeline support, such as something like this: Get-ChildItem –File –Filter “*.TMP” | Remove-Item –Verbose. Find Hidden Message Embedded in Image. Summary: Learn how to find a hidden message embedded in an image.

Find Hidden Message Embedded in Image

Microsoft Scripting Guy, Ed Wilson, is here. Today we have an extra post from Shane Nelson with a recap of an interesting challenge presented to us at our Charlotte PowerShell User Group. Shane is an associate Windows system administrator for a large-scale healthcare provider in the southeast U.S. He has worked in IT for since 2008. The DevOps Collective (@devopscollective) on GitBook · GitBook. The Big Book of PowerShell Gotchas PowerShell is full of "gotchas" - little things that just get in your way and are hard to figure out on your own.

The DevOps Collective (@devopscollective) on GitBook · GitBook

This short book is intended to help you figure them out and avoid them. Last updated 2 months ago The Big Book of PowerShell Error Handling Despite the title, this is actually a very small, concise book designed to help you understand how PowerShell generates and deals with errors. Last updated 5 months ago.


Create a Transcript of Commands from the Windows PowerShell ISE. Create a Really Cool PowerShell ISE Profile. Summary: Learn how to create a powerful Windows PowerShell ISE profile by running a single script.

Create a Really Cool PowerShell ISE Profile

Microsoft Scripting Guy Ed Wilson here. One of the problems with writing a daily blog is that after a while, you end with a huge collection of articles and scripts. When I got a new laptop, and immediately left the country, I was really happy that I could access the Hey, Scripting Guy! Keyboard Shortcuts for the Windows PowerShell ISE. Use the following keyboard shortcuts to perform actions in Windows PowerShell® Integrated Scripting Environment (ISE).

Keyboard Shortcuts for the Windows PowerShell ISE

Windows PowerShell ISE is available as part of the Windows Server and Windows client operating systems, but can also be installed on some older Windows operating systems as part of the Windows Management Framework 4.0 download package. Keyboard shortcuts for editing text You can use the following keyboard shortcuts when you edit text. PowerShell Gallery. Ultimate PowerShell Prompt Customization and Git Setup Guide. Source control and Git keeps getting more and more important for both Developers and Operations guys.

Ultimate PowerShell Prompt Customization and Git Setup Guide

Getting up and running with Git on MacOS or Linux is very easy as most things are built in. There are also cool tools like oh-my-zsh to customize your prompt. On Windows, it’s a bit of a different story. Let’s spend a little time installing ConEmu and Git, then customizing it to take our prompt from something that looks like this: to this: By the end of the article you will have a great looking prompt, a nice Git setup using ssh keys and even be able to squash commits on Windows. We will be installing the following tools for our ultimate git setup: Microsoft PowerShell Tutorial & Training Course – Microsoft Virtual Academy.

Powershell, VB Script, SQL and JavaScript - TechNet IT Pro's and Scripting Guys. PowerShell Code Repository. Windows PowerShell Scripting. Don Jones. Downloading Package. Downloading Git Your download is starting...

Downloading Package

You are downloading the latest (2.10.0) 32-bit version of Git for Windows. This is the most recent maintained build. It was released 9 days ago, on 2016-09-03. If your download hasn't started, click here to download manually. Jonathan Medd's Blog. I often get asked about useful resources for learning PowerShell, in particular what good books are available.

Jonathan Medd's Blog

So I have compiled a list of PowerShell books that I own and would recommend. General. Installing a PowerShell Module. This topic contains the following sections: Rules for Installing Modules Where to Install Modules Installing Multiple Versions of a Module Handling Command Name Conflicts Rules for Installing Modules The following information pertains to all modules, including modules that you create for your own use, modules that you get from other parties, and modules that you distribute to others.

Installing a PowerShell Module

Install Modules in PSModulePath Whenever possible, install all modules in a path that is listed in the PSModulePath environment variable or add the module path to the PSModulePath environment variable value. The PSModulePath environment variable ($Env:PSModulePath) contains the locations of Windows PowerShell modules. By default, the PSModulePath environment variable value contains the following system and user module directories, but you can add to and edit the value.

To get the value of the PSModulePath environment variable, use either of the following commands. Automating anything that moves….. How to Change PowerShell Console Font and Background Colors. During Microsoft Ignite, I took part in a community panel discussion on PowerShell.

How to Change PowerShell Console Font and Background Colors

One of the questions I received is concerned with how to change the color of error messages in the PowerShell console. It is actually quite easy, and it opens up a lot of possibilities once you know the trick. Before I get into how to do this, let’s understand that everything I am going to demonstrate is for the PowerShell console, not the PowerShell ISE. Although some things might work in the ISE, it has its own settings for customizing the appearance, which I might cover in another article. In the console, this is the normal situation.


Powershell for SQL. Windows PowerShell Tip: Creating a Custom Input Box. Here’s a quick tip on working with Windows PowerShell. These are published every week for as long as we can come up with new tips. If you have a tip you’d like us to share or a question about how to do something, let us know. Find more tips in the Windows PowerShell Tip of the Week archive.

Creating a Custom Input Box When Windows PowerShell was released it was touted as a command line-driven management system for people who prefer working in the console window. Go figure. As it turns out, it’s not too difficult to create GUI applications using Windows PowerShell; that’s because Windows PowerShell has access to all the form-building capabilities found in the .NET Framework.


GPO. Security Related Tasks. XML Related Tasks. .Net Methods. Regular Expressions. Objects and Types. Arrays and Hash Tables. Functions. WMI. PSRemoting. Free eBooks. DSC. Windows PowerShell Operators. Windows PowerShell is designed to be an interactive command-line shell, but it's also a programming language. As you advance in your PowerShell understanding and knowledge, it's inevitable you're going to run into a number of core computer programming concepts. Operators are one of these core programming concepts, and you've probably already been using them without necessarily knowing everything about them. The term operator refers to one or more characters in a command or expression that PowerShell interprets in a specific way. For example, the addition operator is the + character, and PowerShell interprets the + character to mean addition. Operators depend on context. PowerShell operators fall into a number of different categories.

The Arithmetic Operators The arithmetic operators consist of the following characters: + (add), - (subtract), * (multiply), / (divide), and % (modulus, or division remainder). The Assignment Operators The Comparison Operators Equality operators. What is this Powershell of which you speak? Determining the Size of a Folder. Scheduled Tasks Cmdlets in Windows PowerShell. Windows Server 2012 R2 and Windows 8.1 Updated: May 8, 2014. Manage File Shares with PowerShell. Server Message Block (SMB) is a protocol that's used extensively by Windows for sharing files, printers, serial ports, and communications abstractions such as named pipes and mail slots between computers. Windows 8 and Windows Server 2012 introduced the SMBShare and SMBWitness modules to manage SMB file servers and SMB file shares.

Thanks to the module auto-loading feature in Windows PowerShell 3.0 and later, these modules are automatically loaded whenever you refer to any of the contained cmdlets. If you're running Windows 7, Windows Sever 2008 R2, or Windows Server 2008, the SMBShare and SMBWitness modules aren't available. However, you can use Windows Management Instrumentation (WMI) to work with file shares.

Community Resources

Event Logs. Liked Cmdlets.