Search Results : 13

This sample defines a PowerShell function that zips all files in a directory...

This sample defines a PowerShell function that adds a date stamp to all files in a directory. By default it adds a stamp in the format _yyyy.MM.dd, but a different format can be passed in through a parameter....

This sample defines a PowerShell function that lists files in a directory that haven't been modified for x number of days. The function takes a parameter which specifies the number of days...

PowerShell offers a couple different methods for formatting text making it easy to get the output you want. The most commonly used methods are the format operator or using composite formatting. This article will discuss both ...

This sample creates a PowerShell function that lists details about disk drives on a machine. By default it will list details about all drives, but you can also supply a specific drive name: ...

The Get-Member cmdlet is arguably the most useful cmdlet in PowerShell and often goes unnoticed by new PowerShell users. You can think of Get-Member as your detective's magnifying glass. The cmdlet allows you to learn about a...

Have you ever wanted to write a script that will get the weather forecast or maybe travel directions? Many sites expose web services that you can tap into from PowerShell to do things like converting currency, getting news he...

This sample demonstrates how to process files from a source directory and then move them to another location. This script remains active always and checks for new files every 30 seconds. Currently it just moves the files, but...

Getting the raw html of a website can be helpful when you want to search for specific text or are building a web scraping application. It can also be handy if you need to set up some kind of automation that interacts with a w...

This sample defines a PowerShell function that lists CPU intensive processes running on a machine. If you call the function without any parameters it will list the top 5 CPU intensive processes. However, you can also pass to ...

PowerShell supports multiple methods for starting a process with the most common being the...

This sample defines a PowerShell function that lists files in a directory that were modified on a given date...

It's fairly common in .NET to have methods with a "ref" or "out" keyword on one of the parameters. This often brings up the question: How do you call such a method from PowerShell? Fortunately, PowerShell makes this relatively simple...

© 2024 Embrs.net