Browse by Tags

Tagged Content List
  • Blog Post: PowerTip: Remove Leading and Trailing Spaces with PowerShell

    Summary : Use the Trim() method to remove extraneous space from a String object. Is there an easy way to drop all spaces that are before or after a string in Windows PowerShell? Use the Trim() method to remove all spaces before and after a string from the output, for example: $Something='...
  • Blog Post: Weekend Scripter: Manipulating Word and Excel with PowerShell

    Summary : Leverage the Office API to manipulate data in Word and Excel with Windows PowerShell. Honorary Scripting Guy, Sean Kearney, is here today to give Ed the day off. Why? Well, it's his birthday, of course! People worldwide have been sending Ed Happy Birthday wishes. His inbox almost went...
  • Blog Post: PowerTip: Use Windows PowerShell to Open Word Document

    Summary : Learn how to use Windows PowerShell to open a Microsoft Word document. How can I open a Word document with Windows PowerShell? Use the New-Object cmdlet: $Filename='C:\HappyBirthdayEd.docx' $Word=NEW-Object –comobject Word.Application $Document=$Word.documents.open...
  • Blog Post: Weekend Scripter: The WMI Explorer Tool

    Summary : Guest blogger, Vinay Pamnani, talks about a cool new WMI tool. Microsoft Scripting Guy, Ed Wilson, is here. One of the absolutely greatest things about working for Microsoft is the chance to meet (even virtually) and interact with really smart people who absolutely love technology. I recently...
  • Blog Post: Weekend Scripter: Use PowerShell to Troubleshoot Group Policy

    Summary : Guest blogger, Alex Verboon, talks about using Windows PowerShell to troubleshoot delays in Group Policy performance. Microsoft Scripting Guy, Ed Wilson, is here. Today we have a new guest blogger, Alex Verboon. I was reading Alex’s blog page. I liked what he had to say and I invited...
  • Blog Post: Weekend Scripter: PowerShell and Chocolatey

    Summary : Guest blogger and Honorary Scripting Guy, June Blender, talks about using Windows PowerShell and Chocolatey. Microsoft Scripting Guy, Ed Wilson, is here. Today, I welcome back guest blogger, June Blender . I’m probably one of five people on earth who really do not like chocolate...
  • Blog Post: PowerTip: Use PowerShell to Install Sysinternals

    Summary : Learn to use Windows PowerShell to easily install Sysinternals utilities. How do I find a Chocolatey package that installs Sysinternals? Use the Find-Package cmdlet: Find-Package –Name Sysinternals Note This command requires the OneGet module in Windows PowerShell 5.0.
  • Blog Post: Weekend Scripter: Exporting and Importing Photos in Active Directory

    Summary : Use Windows PowerShell to import and export photos in Active Directory. Honorary Scripting Guy, Sean Kearney, is here. I was playing about with Active Directory this week. I wanted to be able to get photos to automatically populate on my workstations running Windows 7. By doing some online...
  • Blog Post: PowerTip: Use PowerShell to Identify Users Without a Photo

    Summary : List all users who do not have a photo assigned in Active Directory. Is there a simple way that I can use Windows PowerShell to identify users who do not have a photo assigned in Active Directory? Target the ThumbnailPhoto property, and filter the users for Null : GET-ADUSER –filter...
  • Blog Post: The Scripting Editor Tells All

    Summary : Dia Reeves, aka the Scripting Editor, has some fun talking about working on the Hey, Scripting Guy! Blog. Microsoft Scripting Guy, Ed Wilson, is here. Today we have a guest blog from my editor, Dia Reeves... Hello to all you Windows PowerShell scripters and fans of the Hey, Scripting...
  • Blog Post: Weekend Scripter: A Hidden Gem in the PowerShell Ocean: Get-PSCallStack

    Summary : Microsoft PowerShell MVP, Jeff Wouters, talks about using the Get-PSCallStack Windows PowerShell cmdlet. Microsoft Scripting Guy, Ed Wilson, is here. Today Windows PowerShell MVP, Jeff Wouters, is back with another guest blog post. To read more of Jeff's previous guest posts, see these...
  • Blog Post: Weekend Scripter: Fixing PowerShell GUI Examples

    Summary : Microsoft PowerShell MVP, Dave Wyatt, talks about using Windows PowerShell GUI example code. Microsoft Scripting Guy, Ed Wilson, is here. Welcome back guest blogger, Dave Wyatt. To read more of Dave’s previous guest posts, see these Hey, Scripting Guy! Blog posts . Dave is a Windows...
  • Blog Post: PowerTip: Wire Up PowerShell GUI Buttons

    Summary : Learn to use the OK and Cancel buttons in a Windows PowerShell GUI. How can I use Windows PowerShell to get my GUI’s OK and Cancel buttons to trigger when the user presses ENTER or Escape? Assign the OK and Cancel button objects to your form’s AcceptButton and CancelButton...
  • Blog Post: I've Got a PowerShell Secret: Adding a GUI to Scripts

    Summary : Microsoft PFE, Chris Conte, talks about adding a GUI for Windows PowerShell scripts. Microsoft Scripting Guy, Ed Wilson, is here. Today Chris Conte is our guest blogger. Chris Conte is a premier field engineer at Microsoft who grew up with a passion for computers and the creative arts...
  • Blog Post: Exclude Delayed Start Services when Checking Status with PowerShell

    Summary : Windows PowerShell MVP, Mike Robbins, shows us how to use Windows PowerShell to check the status of Windows services and improve the accuracy of results. Microsoft Scripting Guy, Ed Wilson, is here. Welcome back guest blogger, Mike Robbins. Mike F Robbins is a senior systems engineer...
  • Blog Post: Transforming the Active Directory Cmdlets: Part 5

    Summary : Learn how to translate between ADSI, Quest, and Windows PowerShell cmdlets for creating users. Hey, Scripting Guy! Today I'm translating a script for modifying user properties and I could really use some help. There are so many parameters to work with. Where do I start? —LC...
  • Blog Post: PowerTip: List All Parameters for a Cmdlet

    Summary : Learn to provide a parameter list for a cmdlet in a viewable table. I am trying to work with cmdlets with so many parameters that I am having a hard time reading them in Get-Help . Is there a way to list them in a single table? Access the Parameters property by using Get-Command and the...
  • Blog Post: Transforming the Active Directory Cmdlets: Part 4

    Summary : Learn how to translate between ADSI, Quest, and Windows PowerShell cmdlets to read additional user properties. Hey, Scripting Guy! I'm trying figure something out. I can get some properties with the Quest cmdlets without even asking, but when I go to use the Windows PowerShell cmdlets...
  • Blog Post: PowerTip: Identify All Properties for Active Directory User

    Summary : Use the –Properties parameter to find all properties attached to an Active Directory user. How can I use Windows PowerShell rather than digging through the ADSI editor to find the available properties for a user in our Active Directory? Leverage the –Properties parameter on...
  • Blog Post: Transforming the Active Directory Cmdlets: Part 3

    Summary : Learn how to translate between ADSI, Quest, and Windows PowerShell cmdlets for creating users. Hey, Scripting Guy! I downloaded a script from the Internet to remove users, but it's designed to use the newer Windows PowerShell cmdlets. My server environment doesn't have them available...
  • Blog Post: PowerTip: Use PowerShell to Determine ASCII Value

    Summary : Learn to use Windows PowerShell to determine the ASCII numeric value of a character. How can I use Windows PowerShell to tell the ASCII value of a character? You can get the numeric value of an ASCII character quite easily, for example, to get the value of the lowercase letter a , type...
  • Blog Post: Transforming the Active Directory Cmdlets: Part 2

    Summary : Learn how to transcribe between ADSI, Quest, and Windows PowerShell cmdlets for creating users. Hey, Scripting Guy! I used to use the Quest cmdlets to create new users, but I need to rewrite some of my scripts to work with a legacy environment that can't use the .NET Framework. Can...
  • Blog Post: PowerTip: Convert Plain Text to Secure String

    Summary : Learn to convert a plain text password to a secure string for cmdlet parameters. I'm trying to convert some scripts to work with the Active Directory modules, but they need a secure string for the password. How do I create one of these? Use the ConvertTo-SecureString cmdlet, capture...
  • Blog Post: Transforming the Active Directory Cmdlets: Part 1

    Summary : Learn how to translate between ADSI, Quest, and Windows PowerShell cmdlets for creating users in Active Directory. Hey, Scripting Guy! I've got some older scripts that create users by using the [ADSI] accelerator. Can you show me how they might be rewritten to work with the more modern...
  • Blog Post: PowerTip: Find List of Users in Active Directory

    Summary : Use the Filter parameter in the Active Directory module. I was playing with the Active Directory cmdlets and noticed that they seem to need the Distinguished Name. Is there any way to find users instead of supplying this very explicit object each time? Use the –Filter parameter...