Top "Cmdlet" questions

A cmdlet is a lightweight Windows PowerShell script that performs a single function.

How to get the current directory of the cmdlet being executed

This should be a simple task, but I have seen several attempts on how to get the path to the …

powershell cmdlet
How to properly use the -verbose and -debug parameters in a custom cmdlet

By default, any named function that has the [CmdletBinding()] attribute accepts the -debug and -verbose (and a few others) parameters …

powershell parameters cmdlets cmdlet
How to save each line of text file as array through powershell

If I have a text file, C:\USER\Documents\Collections\collection.txt that has the following information: collectionA.json collectionB.…

arrays powershell file-io line cmdlet
Set the encoding to ANSI in PowerShell 2.0

I want to set the encoding of a file to ANSI using the parameter -Encoding of the Set-Content cmdlet, I …

powershell encoding powershell-2.0 ansi cmdlet
get a folder path from the explorer menu to a powershell variable

is it possible to open a explorer window from powershell and store the path selected in the explorer, to a …

powershell explorer cmdlet
creating powershell script to backup a file and append the date

Currently I have a one line batch file to back up a file. I run it manually when I need …

powershell cmdlet
Setting GPO security filter with powershell Set-GPPermissions cmdlet

According to Microsoft the cmdlet Set-GPPermissions accepts the option "-replace": "This ensures that the existing permission level is replaced by …

security powershell filter cmdlet gpo
Get-MailboxPermissions cmdlet not working/recognised

Hi Stackoverflow people, I have been trying to use the Get-MailboxPermission cmdlet to run a report on all my mailboxes. …

powershell exchange-server cmdlets cmdlet
Download Multiple Files from http using Powershell with proper names

I have searched for something similar and I keep running across the FTP download answers. This is helpful information, but …

http powershell cmdlet
Is it possible to hide the user input from read-host in Powershell?

I´m looking for a way to hide the user input from the Read-Host cmdlet. I know I can do …

powershell input hide cmdlet