Browse by Tags

Tagged Content List
  • Blog Post: Using a Tuple in PowerShell

    Summary : Learn how to use a Tuple in Windows PowerShell Hey, Scripting Guy! I read your article from yesterday, so I know about Tuples. How do I actually use one? —HD Hello HD, Microsoft Scripting Guy, Ed Wilson, is here. I just got back from working out with my trainer. I am not nearly...
  • Blog Post: What’s a Tuple, and Why Would I Want to Use It?

    Summary : Learn about using tuples with Windows PowerShell. Hey, Scripting Guy! What is a tuple, and why would I want to use one? —RT Hello RT, Microsoft Scripting Guy, Ed Wilson, is here. I just got back from the gymnasium, and I am sitting on the back porch sipping a glass of water...
  • Blog Post: PowerTip: Use PowerShell to Sort Array

    Summary : Use Windows PowerShell to sort an array. How can I use Windows PowerShell to sort an array? Use the static Sort method from the [array] class, for example: $a = 1,2,4,5,3,6 [array]::sort($a)
  • Blog Post: Weekend Scripter: Parse Folder of Data with PowerShell

    Summary : Use Windows PowerShell to parse a folder that contains data dumps. Microsoft Scripting Guy, Ed Wilson, is here. This morning I got up, and headed to the Farmers Market in town. I picked up a fresh melon for breakfast and some locally made cheese. Melon and cheese with a nice up of English...
  • Blog Post: PowerTip: Using PowerShell to Determine if Path Is to File or Folder

    Summary : Learn how to use Windows PowerShell to determine if a path is to a file or a folder. How can I use Windows PowerShell to determine if a path is to a file or a folder? Use the Get-Item cmdlet to get the object represented by the path. Then use the –Is operator to see if the object...
  • Blog Post: Weekend Scripter: A Function to Clean Up Data Import

    Summary : Learn about a Windows PowerShell function you can use to clean up data prior to import. Microsoft Scripting Guy, Ed Wilson, is here. We are entering the Labor Day weekend in the United States today. Labor Day is a sad holiday, but it is also a happy time. It is sad because it traditionally...
  • Blog Post: PowerTip: Use PowerShell to Set Primary and Secondary DNS Server Addresses

    Summary : Use Windows PowerShell to set the primary and secondary DNS server addresses for a client. I recently changed the IP address scheme for an entire subnet. How can I use Windows PowerShell to set the primary and secondary DNS server addresses for the client workstations? Use the Set-DNSClientServerAddress...
  • Blog Post: Creating Custom PowerShell Objects

    Summary : Use Windows PowerShell to create custom objects prior to data export. Microsoft Scripting Guy, Ed Wilson, is here. It is nice and cool this morning so I decided to walk over to the neighborhood coffee and tea shop to have a cup of tea. I can sit outside and enjoy the day. There is free wireless...
  • Blog Post: PowerTip: Hide Common Code in PowerShell ISE

    Summary : Learn how to hide common code in the Windows PowerShell ISE. How can I hide related code in the Windows PowerShell ISE to make it easier to troubleshoot and to read? Open the ISE, and in the script pane, begin a section with the #Region tag and a name. Then end the section with the #EndRegion...
  • Blog Post: Use PowerShell to Fix Address Issues Prior to Export

    Summary : Use Windows PowerShell to fix address issues prior to exporting the data to another database. Microsoft Scripting Guy, Ed Wilson, is here. This morning I am listening to The Doors on my Zune HD, and sipping a very nice cup of tea. I used three spoons of Darjeeling tea , one spoon of lemon...
  • Blog Post: PowerTip: Use Graphical Tool to Create PowerShell Commands

    Summary : Learn how to use a graphical tool to create Windows PowerShell commands. How can I use Windows PowerShell so that I can point-and-click at options that are available for a using a particular cmdlet? Use the Show-Command cmdlet and select the parameters you need, for example: Show-Command...
  • Blog Post: Use PowerShell to Normalize Names Before Data Import

    Summary : Use Windows PowerShell to normalize names before importing data. Microsoft Scripting Guy, Ed Wilson, is here. I have been reading Jane Austen Northanger Abbey this week in the evenings. I really love the way Jane Austen develops her characters. I also like some of the ways the characters...
  • Blog Post: PowerTip: Use PowerShell to Change System Time

    Summary : Learn how to use Windows PowerShell to change the system time. The clock on my computer (running Windows 8.1) is 30 minutes slow. How can I use Windows PowerShell to move the system time up 30 minutes? Use the Set-Date cmdlet, create a TimeSpan object equal to 30 minutes, and supply it...
  • Blog Post: PowerTip: Create Custom Names for CSV File

    Summary : Use Windows PowerShell to create custom column headings. How can I use Windows PowerShell to generate custom heading for a CSV file when I import it? Specify the –Header parameter as an array of names in the order of the fields, for example: Import-CSV c:\fso\myfile.csv –delimiter...
  • Blog Post: Use PowerShell to Read Munged Data

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell with munged data. Microsoft Scripting Guy, Ed Wilson, is here. Last week, the Scripting Wife and I had the opportunity to attend the Charlotte SQL Users Group. This is always a highlight, because that user group is...
  • Blog Post: PowerTip: Use PowerShell to Read Tab Delimited File

    Summary : Use Windows PowerShell to read a Tab delimited file. How can I use Windows PowerShell to read a Tab delimited file? Use the Import-CSV cmdlet and specify a delimiter of `t , for example: $a = Import-Csv -Delimiter "`t" -Path c:\fso\mytabfile.tsv
  • 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: PowerTip: Find Cmdlets that Need TimeSpan Object

    Summary : Use Get-Command to find cmdlets that need a TimeSpan object for input. How can I use Windows PowerShell to find which cmdlets will accept a TimeSpan object for input? Use the ParameterType parameter from the Get-Command cmdlet, for example: Get-Command -ParameterType timespan
  • 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: PowerShell Mini-Scripting Games 2014: Answer 5

    Summary : Here is the answer to Problem 5 in Windows PowerShell Mini-Scripting Games 2014. Microsoft Scripting Guy, Ed Wilson, is here. It is time for the answer to Problem 5 in Mini-Scripting Games 2014. Last week, I posted the complete Problem 5 description and task outline . Problem 5 synopsis...
  • Blog Post: PowerTip: Mini-Scripting Games 2014 Answer 5

    Summary : Here is the answer to the final question in Mini-Scripting Games 2014. You created a constant variable in your Windows PowerShell console. Now, when you attempt to delete the variable, you get an error message. How can you remove a constant variable? A constant variable is created by...
  • Blog Post: PowerShell Mini-Scripting Games 2014: Answer 4

    Summary : Here is the answer to Problem 4 in Windows PowerShell Mini-Scripting Games 2014. Microsoft Scripting Guy, Ed Wilson, is here. It is time for the answer to Problem 4 in Mini-Scripting Games 2014. Last week, I posted the complete Problem 4 description and task outline . Problem 4 synopsis...
  • Blog Post: PowerTip: Mini-Scripting Games 2014 Answer 4

    Summary : Here is the answer to the fourth question in Mini-Scripting Games 2014. You are attempting to use Try/Catch/Finally in your script. No matter what you try, the script never seems to catch it. What is the most likely cause of the problem? The most likely cause of the problem is that your...
  • Blog Post: PowerShell Mini-Scripting Games 2014: Answer 3

    Summary : Here is the answer to Problem 3 in Windows PowerShell Mini-Scripting Games 2014. Microsoft Scripting Guy, Ed Wilson, is here. Today it is time to look at Problem 3. Last week, I posted the complete Problem 3 description and task outline . Problem 3 synopsis One of your teammates wrote...