background preloader


Facebook Twitter

How to fix Truncated PowerShell Output - MCSAGURU.


CommandLet information. PowerShell Cmdlets: List all availabe parameters without using the Help. Creating Colorful HTML Disk Reports with PowerShell. I have no idea what possessed me, but the other day I came across an older script that uses PowerShell to create an HTML report showing drive utilization for a group of computers.

Creating Colorful HTML Disk Reports with PowerShell

The utilization is displayed using a color gradient from green to red to provide a visual reference. As I looked at the code I thought about what would be interesting to add and now a day or two later I have something new to show you. The function could have been revised using commands in the Storage module like Get-Volume and Get-Disk. But I decided to stick to using Get-CimInstance to query traditional Win32_* classes. I also wanted to leverage the use of Get-CimAssociatedInstance to capture additional information. Usage is pretty straightforward. As you look through the code, notice how I’m using Write-Progress to keep the user informed. The color gradient is self-evident but let me point out a few other things.


PowerShell Module Browser. Active Directory: PowerShell AD Module Properties. Each of the PowerShell Active Directory module cmdlets, like Get-ADUser and Get-ADComputer, displays a default set of properties for all objects retrieved.

Active Directory: PowerShell AD Module Properties

You can specify other properties with the -Properties parameter, but the default set will always be included. There is another set of extended properties that can be specified. In addition, any Active Directory attribute appropriate to the class of objects can be included by specifying the LDAPDisplayName of the attribute in the -Properties parameter. Both the default and extended properties are really methods. They return values based on the actual Active Directory attributes of the objects, converted in many cases for display. Most of the Get-AD* cmdlets support the -Properties parameter. . ↑ Return to Top Default Properties. Inventorying Computers with AD PowerShell. Get-ADComputer The cmdlet of choice for inventorying computers through AD is Get-ADComputer.

Inventorying Computers with AD PowerShell

This command automatically searches for computer objects throughout a domain, returning all sorts of info. Sample scripts for system administration. Creating a Custom Input Box. Powershell: Everything you wanted to know about hashtables.


Powershell Core. Running PowerShell Scheduled Tasks - a Second Opinion. I recently published an article titled Running PowerShell Scripts As a Scheduled Task.

Running PowerShell Scheduled Tasks - a Second Opinion

That article was from a reader showing how he ran one of the PowerShell scripts as a scheduled task. After that article was released, another reader, Guy Leech (@guyrleech), sent me a Word document showing how he accomplishes the same task. What follows are Guy’s words. The only things I have changed are some of what Grammarly thought should be corrected. Enable and Use Remote Commands in Windows PowerShell. Windows PowerShell Tip: Fun Things You Can Do With the Get-ChildItem Cmdlet. Here’s a quick tip on working with Windows PowerShell.

Windows PowerShell Tip: Fun Things You Can Do With the Get-ChildItem Cmdlet

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. Fun Things You Can Do With the Get-ChildItem Cmdlet It’s another gloomy, overcast day here in Seattle, and there’s nothing to do, nothing at all. Microsoft Certified Professional Magazine Online.

PowerShell Pipeline PowerShell Basics: Working with the If Statement Just like any good tool, knowing the different ways to use the If statement will help your script in many ways.

Microsoft Certified Professional Magazine Online

By Boe Prox03/09/2016 Every programming and scripting language has had some sort of way to perform a conditional operation using an If statement as part of flow control in a script or program. PowerShell is definitely no different and I am going to take some time to cover the basics of PowerShell by looking at the If/Else/ElseIf statements to help you know when and where to use them.

Working in PowerShell, there will be times that you need to perform some sort of comparison to determine what kind of action should take place. A quick example that shows this in action will simply look at if a number is 1 or isn't 1. If (1 -eq 1) { 'This number is 1' } Else { 'This number is not 1' } The result of what will happen should seem pretty obvious.

How to Create a Windows PowerShell Profile. This documentation is archived and is not being maintained.

How to Create a Windows PowerShell Profile

Updated: December 1, 2010 Applies To: System Center Service Manager 2010 SP1.


PowerShell One-Liners: Help, Syntax, Display and Files - Simple Talk. This series is in four parts: This is part 1 Well, yes, it would be an onerous task indeed to deliver everything.

PowerShell One-Liners: Help, Syntax, Display and Files - Simple Talk

But per the Pareto principle, roughly eighty percent of what you could want to know about PowerShell is here in this series of articles; possibly more! You will tend to learn the other twenty percent as you go, and you may not need it for quite a ways into your PowerShell explorations. I feel compelled to confess that some of the entries are not, strictly speaking, on one physical line, but are written in such a way that, if you really want to run them in one line, you can just remove the line breaks and they will work. Svendsen Tech Powershell Wiki. Getting computer names from AD using Powershell - Svendsen Tech Powershell Wiki. Often as a Windows system administrator, you will want to get a list of computer/host names from (an OU in) Active Directory.

Getting computer names from AD using Powershell - Svendsen Tech Powershell Wiki

Here are a few ways of doing it with PowerShell, using System.DirectoryServices.DirectorySearcher ([adsisearcher]) with an LDAP query, Get-ADComputer from the Microsoft ActiveDirectory module cmdlets and Get-QADComputer from Quest ActiveRoles. These MS AD cmdlets that Get-ADComputer and Get-ADObject are part of are installed as a feature under the category "Remote Server Administration Tools" (RSAT) from Server Manager on Windows Server 2008 R2 and can be downloaded for Windows 7. There's more information about this here and here. Create a Transcript of Commands from the Windows PowerShell ISE - Hey, Scripting Guy! Blog.

Summary: Create a transcript of commands from the Windows PowerShell ISE in this Microsoft Scripting Guys how-to article.

Create a Transcript of Commands from the Windows PowerShell ISE - Hey, Scripting Guy! Blog

Microsoft Scripting Guy Ed Wilson here. One of the things I enjoy about using the Windows PowerShell console is the transcript feature. When I am playing around on the Windows PowerShell console, experimenting, trying out new ideas, and exploring ideas, it is great not to worry about losing any cool code I discover. Powershell, VB Script, SQL and JavaScript - TechNet IT Pro's and Scripting Guys. Windows PowerShell Scripting. PowerShell for Beginners.

Remote Desktop Services

Hyper-V. What to DO, What NOT to do. TechNet forums. PowerShell 3.0 For Windows 7 SP1, Windows Server 2008 R2 SP1 & Windows Server 2008 SP2. The Windows Management Framework 3.0, or PowerShell 3.0 for legacy operating systems including Windows 7 SP1, Windows Server 2008 R2 SP1 & Windows Server 2008 SP2, has been made available to download. System Center. SQL. Citrix. QAD cmdlets reference - PowerGUI Wiki. QAD cmdlets reference From PowerGUI Wiki Jump to: navigation, search The ActiveRoles Management Shell for Active Directory is an Active Directory specific automation and scripting shell that provides a command-line management interface for administering directory data either via Quest ActiveRoles Server or by directly accessing Active Directory domain controllers. The ActiveRoles Management Shell is built on Microsoft Windows PowerShell technology. This reference is for AD cmdlets version 1.4. You can download AD cmdlets here. The following cmdlets are currently in the package:

Windows Server 2008, Exchange advice. Help solving computer problems. VBScript. PowerShell 2.0 commands. Windows PowerShell. Updated: July 8, 2013 Windows PowerShell® is a task-based command-line shell and scripting language designed especially for system administration. Built on the .NET Framework, Windows PowerShell® helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows.

The documents published here are written primarily for cmdlet, provider, and host application developers who require reference information about the APIs provided by Windows PowerShell. However, system administrators might also find the information provided by these documents useful. Dmitry’s PowerBlog PowerShell and beyond. PowerShell Pro!


TechNet. IE. 10 cool things you can do with Windows PowerShell. If PowerShell's learning curve has kept you from embracing it for daily use, "cool" might not be a word you'd associate with it. But PowerShell is here to stay. It's a core part of Exchange 2007, Windows Server 2008, and SQL Server 2008, and it has immense power worth tapping into. Windows PowerShell Blog. Microsoft Certified Professional Magazine Online. Prof. Powershell Can I Get a Little PowerShell Help? When looking for cmdlet help, PowerShell 3 goes beyond version 2 with an Update-Help cmdlet. Because Windows PowerShell is part of the operating system, updating help and documentation is difficult.

Windows PowerShell for Windows Server 2012 and Windows 8. Running Windows PowerShell Scripts Against Multiple Computers. Scripting Community. List of Free PowerShell eBooks. When I needed to build a collection of PowerShell resources for our internal IT personnel, I had trouble finding a comprehensive list of all the freely available eBooks out there. I thought it would be worth spending a few minutes collecting these links in a single place. If you know of any that I’m missing, please let me know. Powershell.


The Admin’s First Steps: Documenting Servers - Hey, Scripting Guy! Blog. Summary: Richard Siddaway talks about using Windows PowerShell to automate the creation of your server documentation. Hey, Scripting Guy! Werner Training and Consulting, Inc. Werner Training and Consulting, Inc. has written courseware, scripts, blog articles, and delivered training on Microsoft's Windows PowerShell for over three years.