Browse by Tags

Tagged Content List
  • Blog Post: PowerTip: Use PowerShell to Identify Files Without an Extension

    Summary : Use Windows PowerShell to identify files that do not have an extension. How can I use Windows PowerShell to easily identify files that do not have an extension? Use the HasExtension static method from the System.IO.Path .NET Framework class, for example: [System.IO.Path]::hasExtension...
  • Blog Post: PowerTip: Use PowerShell to Find Temp User Directory

    Summary : Use Windows PowerShell to find the temporary user directory. How can I use Windows PowerShell to find location of my temporary user directory? Use the GetTempPath static method from the System.IO.Path .NET Framework class: [System.IO.Path]::GetTempPath()
  • Blog Post: PowerTip: Use PowerShell to Generate Random File Name

    Summary : Use Windows PowerShell to generate a random file name. How can I use Windows PowerShell to generate a random file name so I can ensure that a file I create does not have a naming conflict? Use the GetRandomFileName static method from the System.IO.Path .NET Framework class, for example...
  • Blog Post: PowerTip: Use PowerShell to Return Directory Information

    Summary : Use Windows PowerShell to return directory information. How can I use Windows PowerShell to provide information about directories in a specific location? Use the Get-ChildItem cmdlet, specific the path and use the –Directory switch, for example: Get-ChildItem e:\data -Directory
  • Blog Post: PowerTip: Use PowerShell to Decrypt Files

    Summary : Use Windows PowerShell to decrypt files. How can I use Windows PowerShell to decrypt a file that it previously encrypted? Use the Decrypt static method from System.IO.File .NET Framework class, for example: [io.file]::Decrypt("C:\fso\FileWithOutExtension")
  • Blog Post: PowerTip: Use PowerShell to Show Illegal File Name Characters

    Summary : Use Windows PowerShell to display illegal characters for a file name. How can I use Windows PowerShell to easily obtain a list of characters that are not permitted in file names? Use the GetInvalidFileNameChars static method from the System.IO.Path .NET Framework class: [System.IO...
  • Blog Post: PowerTip: Fix Network Connection Profile with PowerShell

    Summary : Use Windows PowerShell to fix the network connection profile on your laptop running Windows 8.1. How can I use Windows PowerShell to fix the connection profile for my home network on my laptop running Windows 8.1? Use the Get-NetAdapter cmdlet to verify the interface index, and then use...
  • Blog Post: PowerTip: Compare Processes with PowerShell

    Summary : Learn how to compare two processes with Windows PowerShell. How can I use Windows PowerShell to find the differences between two instances of the same process running on my system? Use the Compare-Object cmdlet and specify specific properties to examine, such as cpu , id , vm , and ws...
  • Blog Post: PowerTip: Find “Hidden” Property Values in PowerShell

    Summary : Learn how to find some missing property values in Windows PowerShell. How can I find missing property values in the process information I am looking at in Windows PowerShell? Launch Windows PowerShell with Admin rights (hold down the Shift key, right-click the Windows PowerShell icon...
  • Blog Post: PowerTip: Troubleshoot a Word Automation Script

    Summary : Learn to troubleshoot a Windows PowerShell script for Microsoft Word automation. I have been struggling with a Windows PowerShell script that automates Word. Every time I run the script, I get an error message that says the Word document is locked. What can I do? When you test or develop...
  • Blog Post: PowerTip: Easy Way to Troubleshoot PowerShell Script

    Summary : Learn the easy way to troubleshoot a Windows PowerShell script. I receive an error message every time I run my Windows PowerShell script. What is an easy way to troubleshoot the script in the Windows PowerShell ISE? Highlight the line of code in the script to select it (use the mouse...
  • Blog Post: PowerTip: Check Syntax Options for PowerShell Cmdlet

    Summary : Use the Get-Command cmdlet to check syntax options for a Windows PowerShell cmdlet. How can I easily find syntax options (parameter sets) that exist for a particular Windows PowerShell cmdlet? Use the Get-Command cmdlet and check the Definition property, for example: (Get-Command Stop...
  • Blog Post: PowerTip: Release COM Object in PowerShell

    Summary : Learn how to release a COM object in Windows PowerShell. How can I make sure that a COM object in m y Windows PowerShell automation script releases? Use the ReleaseCOMObject static method from the Marshal class, and then pass it to the variable that holds the COM object, for example:...
  • Blog Post: PowerTip: Get Row from CSV File Based On Value

    Summary : Use Windows PowerShell to get a row from a CSV file based on a specific value. How can I use Windows PowerShell 4.0 to look up a specific row from a CSV file I imported into a variable? Use the Where method, and use a match pattern to search on a specific column and value, for example...
  • Blog Post: PowerTip: Use PowerShell ISE for Standard Enumerations

    Summary : Use the Windows PowerShell ISE to use enumeration values. How can I use the Windows PowerShell ISE to use the standard enumeration types to write a Word automation script? Cast the string as a type , and store the returned value in a variable. Each enumeration value will be available...
  • Blog Post: PowerTip: Use PowerShell to List Word Autocorrect Entries

    Summary : Use Windows PowerShell to list autocorrect entries for Microsoft Word. Microsoft Word keeps messing up what I type, and I suspect it could be an autocorrect issue. How can I use Windows PowerShell to list all the entries in Microsoft Word autocorrect? Use the New-Object cmdlet to create...
  • Blog Post: PowerTip: Find PowerShell Help for Specific Parameter

    Summary : Use Windows PowerShell Help to assist with a specific parameter. I know I can use Get-Help –full to see the complete Help for a Windows PowerShell cmdlet, but how can I see the Help for only a specific parameter? Use the Get-Help cmdlet, specify the cmdlet name, and then specify...
  • Blog Post: PowerTip: Use PowerShell to Start a Bunch of Processes

    Summary : Learn how to start a bunch of processes by using Windows PowerShell. How can I use Windows PowerShell to start a whole bunch of processes for testing purposes on one of my systems? Use a Windows PowerShell range operator, such as 1..10 , to specify how many processes you want to create...
  • Blog Post: PowerTip: Open Fonts Dialog Box with PowerShell

    Summary : Use a Windows PowerShell cmdlet to open the Fonts dialog box. How can I use Windows PowerShell to open the Fonts dialog box so I don't have to mouse around trying to find it? Use the Show-ControlPanelItem cmdlet: Show-ControlPanelItem fonts
  • Blog Post: PowerTip: Find Assigned Virtual Machine Network Adapters

    Summary : Learn how to find network adapters that are assigned to virtual machines. How can I use Windows PowerShell to find what network adapters are assigned to my virtual machines? Use the Get-VM cmdlet and pipe the results to the Get-VMNetworkAdapter cmdlet, for example: Get-VM | Get-VMNetworkAdapter...
  • Blog Post: PowerTip: Run Part of PowerShell Command

    Summary : Learn how to run part of a command in the Windows PowerShell ISE. I am having problems with a small part of a script that I am working on in the Windows PowerShell ISE— how can I test only that code? Highlight only the portion of the script you want to test, and press the F-8 key...
  • Blog Post: PowerTip: Automatically Find Options in PowerShell

    Summary : Learn how to see available options in the Windows PowerShell ISE. How can I easily see what options are available when I type in a cmdlet name in the Windows PowerShell ISE? Use IntelliSense. There are two ways to display IntelliSense: 1. From the Edit menu, select Start Intellisense...
  • Blog Post: PowerTip: Find What a PowerShell Command Does

    Summary : Learn how to find out what a Windows PowerShell command does before it does it. I found a Windows PowerShell command on the Internet that might be what I need, but how can I see what it does before it messes something up? You can add the –WhatIf parameter to all Windows PowerShell...
  • Blog Post: PowerTip: Find PowerShell Commands

    Summary : Learn how to easily find Windows PowerShell commands. How can I use Windows PowerShell if I do not know the appropriate command to use or the available options? In the Windows PowerShell console, type Show-Command . In the dialog box that appears, type what you need— such as process...
  • Blog Post: PowerTip: Use PowerShell to Display Routing

    Summary : Use Windows PowerShell to display networking routing information. How can I use Windows PowerShell to display information about network connectivity issues related to the routing table on my server and permit me to sort the output? Use the Get-NetRoute Windows PowerShell function, and...