#PSTip Create a file of the specified size
Sometimes you need to create a file of the specified size, as a placeholder for instance. There are many utilities that do that (e.
Read MoreSometimes you need to create a file of the specified size, as a placeholder for instance. There are many utilities that do that (e.
Read MoreNote: This tip requires PowerShell 2.0 or above. Let’s say you want to rename a bunch of files in a folder and imagine that you used the following code:
Read MoreNote: This tip requires PowerShell 3.0 or above. The Invoke-WebRequest and Invoke-RestMethod cmdlets have the -UserAgent parameter, so you can specify a user agent string for the web request.
Read MoreNote: This tip requires PowerShell 2.0 or above. PowerShell has many logging capabilities but sometimes what you want is to capture what’s already written to the console.
Read MoreNote: This tip requires PowerShell 2.0 or above. $host automatic variable contains the details of the PowerShell host. For example, information such as the name of the host, UI culture information, etc.
Read MoreNote: This tip requires PowerShell 2.0 or above. Every PowerShell host implements the $pid automatic variable which refers to the process ID of the PowerShell host process.
Read More