Browse by Tags

Tagged Content List
  • Blog Post: PowerTip: List All Running Tasks in Windows 8.1

    Summary : Use Windows PowerShell in Windows 8.1 to show all running tasks in Task Scheduler. Sometimes I get CPU spikes on a server. As part of troubleshooting, I need to know the processes and which are scheduled tasks. Is there a way for Windows PowerShell to show me which tasks are running now...
  • Blog Post: PowerTip: List all Local Printers in Windows 8.1

    Summary : Use Windows PowerShell in Windows 8.1 to list locally attached printers. How can I use Windows PowerShell in Windows 8.1 to give me a list of network-connected printers? Use the Get-Printer cmdlet and filter on the type of connection: Get-Printer | Where { $_.Type –eq ‘Connection’...
  • Blog Post: PowerTip: Use PowerShell to Pause Execution

    Summary : Use Windows PowerShell to pause execution for a specific time to wait for a process to exit. I have a process that normally exits within four seconds, and I want to pause the execution of my script to wait for this process to exit. If it does not exit in time, I want an error to occur. How...
  • Blog Post: PowerTip: Use PowerShell to Display Known Colors

    Summary : Boe Prox shows how to find all known colors on your computer. How can I use Windows PowerShell to find known colors on my computer and their hex representations? Use the Add-Type cmdlet as follows: Add-Type –assemblyName PresentationFramework [windows.media.colors] | Get-Member...
  • Blog Post: PowerTip: Use PowerShell to Audit Shares

    Summary : Use Windows PowerShell in Windows 8.1 to audit shares on a workstation. Is there an easy way to use Windows PowerShell to identify shares on a workstation and who has access to them? Use a combination of the Get-SMBShare and Get-SMBShareAccess cmdlets: Get-SMBShare | Get-SMBShareAccess
  • Blog Post: PowerTip: Enable IIS in Windows 8.1 with PowerShell

    Summary : Use the DISM cmdlets to enable the built-in IIS component in Windows 8.1. Is there a quick and easy way to enable IIS in Windows 8.1on my developer laptops? With Windows 8.1, you only need to enter one line in Windows PowerShell: Enable-WindowsOptionalFeature –online –featurename...
  • Blog Post: PowerTip: Update Windows Defender with PowerShell

    Summary : Use Windows PowerShell cmdlets in Windows 8.1 to update the antivirus definitions. How can I use Windows PowerShell, rather than navigating the GUI, to force updates for Windows Defender? In Windows 8.1, you can execute the following cmdlet and bring the Windows Defender up to date: ...
  • Blog Post: PowerTip: List Contents of DNS Zone with PowerShell

    Summary : Use the DNS server cmdlets in Windows Server 2012 R2 to show contents of a zone. I used to take screenshots and print screens to document my DNS server zones. Can I do this with Windows PowerShell? To list all zones in a DNS server, in Windows Server 2012 R2 use the Get-DNSServerZone...
  • Blog Post: PowerTip: List DHCP Server Clients with PowerShell

    Summary : Use the DHCP server cmdlets in Windows Server 2012 R2 to show current clients. How can I use Windows PowerShell to show my current DHCP server clients? Use the Get-DHCPServerv4scope and Get-DHCPServerv4Lease cmdlets piped together: Get-DHCPServerv4scope | Get-DHCPServerv4Lease
  • Blog Post: PowerTip: Use PowerShell to Get DNS Settings

    Summary : Use Windows PowerShell to retrieve local DNS server addresses. With IPconfig, I used to pipe output to the FIND command to filter only DNS information. Is there a better way to do this in Windows Server 2012 R2? Use the Get-DnsClientServerAddress cmdlet: Get-DnsClientServerAddress...
  • Blog Post: PowerTip: Use PowerShell to Get IP Addresses

    Summary : Use Windows PowerShell to retrieve IP addresses. Is there a way to use Windows PowerShell to check IP addresses without use IPconfig ? In Windows Server 2012 R2, use the new Get-NetIPAddress cmdlet: Get-NetIPAddress If you like the output in a table, use: Get-NetIPAddress | Format...
  • Blog Post: PowerTip: Use PowerShell to Rename Network Adapter

    Summary : Use Windows PowerShell to rename network adapters in Windows Server 2012 R2. Is there a way to use Windows PowerShell in Windows Server 2012 R2 to rename a network adapter? Use the Rename-NetAdapter cmdlet. For example, to rename the network adapter called “Ethernet” to “ManagementPort”...
  • Blog Post: PowerTip: Use PowerShell to List Firewall Rules

    Summary : Use Windows PowerShell to list firewall rules configured in Windows Server 2012 R2. How can I use Windows PowerShell to show the inbound firewall rules in Windows Server 2012 R2 that are enabled? Use the Get-NetFirewallRule cmdlet to get the entire list, and then filter on the Enabled...
  • Blog Post: PowerTip: Use PowerShell to Get List of Network Teams

    Summary : Learn how to use the NetSwitchTeam module in Windows PowerShell to list network teams. How can I use Windows PowerShell in Windows Server 2012 R2 to list all the network teams? Use the Get-NetSwitchTeam cmdlet: GET-NetSwitchTeam …or to show all teams starting with the name...
  • Blog Post: PowerTip: Use PowerShell to List Only Directories

    Summary : Learn how to use Windows PowerShell to show all directories. How can I use Windows PowerShell to list ONLY directories in a folder structure? Use Get-ChildItem on the target folder and specify the Directory parameter: Get-ChildItem C:\Foo –recurse -directory
  • Blog Post: PowerTip: Use PowerShell to Display Pop-Up Window

    Summary : Learn how to display a pop-up window by using Windows PowerShell. How can I use Windows PowerShell to display a pop-up window to a user when a script or function has completed? There are several ways to display a pop-up window, but the following command doesn’t require loading assemblies...
  • Blog Post: Use Delegated Administration and Proxy Functions

    Summary : Boe Prox shows how to create a secure PSSession endpoint by using delegated administration and a proxy function. Hey, Scripting Guy! There are some great things that I can do with a constrained Windows PowerShell endpoint. But I want to allow a user (who may not have the necessary rights...
  • Blog Post: PowerTip: Restore Default PSSession Endpoints

    Summary : Learn how to restore default PSSession endpoints. How do I restore my default PSSession endpoints if I accidently unregistered them? Use Enable-PSRemoting to automatically rebuild the remote endpoints on your system: Get-PSSessionConfiguration Enable-PSRemoting –Force #Now...
  • Blog Post: PowerTip: Test a PSSession Configuration File

    Summary : Learn how to test a PSSession configuration file. How do I ensure that my PSSession configuration is valid? Use the Test-PSSessionConfigurationFile cmdlet to see if the file is valid (True) or not (False). Test-PSSessionConfigurationFile –Path ConstrainedSession.pssc True
  • Blog Post: PowerTip: List Remote PowerShell Endpoint Configurations

    Summary : Learn how to list remote Windows PowerShell endpoint configurations. How can I list remote Windows PowerShell endpoint configurations? Connect-WSMan -ComputerName dc1 sl WSMan: Get-ChildItem dc1\Plugin\microsoft* And here is the output: WSManConfig: Microsoft.WSMan.Management...
  • Blog Post: PowerTip: Use PowerShell to Save Verbose Messages in Output File

    Summary : Learn how to use Windows PowerShell to save verbose messages from a script in an output file. How can I use Windows PowerShell to save the verbose messages from a script in an output file? Use the redirection operator that directs verbose messages (stream #4) to a file: PS C:\>...
  • Blog Post: PowerTip: Use PowerShell to Find Internet Explorer Settings

    Summary : Learn how to use Windows PowerShell to find Internet Explorer settings. How can I use Windows PowerShell to explorer the various settings for Internet Explorer? Use the Get-Item cmdlet and explore the Internet Explorer main hive for the current user: get-item 'HKCU:\Software\Microsoft...
  • Blog Post: PowerTip: Find Processes with Process ID Less Than 1000

    Summary : Use Windows PowerShell to find processes with a process ID that is less than 1000. How can I use Windows PowerShell to find all processes that have a process ID less than 1000? Use the Get-Process cmdlet, pipe the resulting objects to the Select-Object cmdlet, choose the process name...
  • Blog Post: PowerTip: Use PowerShell to Check Validity of User Certificates

    Summary : Learn how to quickly check user certificates by using Windows PowerShell. How can I use Windows PowerShell to check the validity of user certificates without engaging in a manual process? Use the certificate provider to obtain a list of certificate objects, and pipe the results to the...
  • Blog Post: PowerTip: Find Aliases Exported by PowerShell Module

    Summary : Find aliases that were exported from a Windows PowerShell module. How can I find aliases that were exported from a particular module on my system? Use the Get-Command cmdlet, specify the module, pipe the results to the Foreach-Object cmdlet, and then look for aliases: Get-Command ...