Powershell

Spying on Parameters

Your own PowerShell functions can have the same sophisticated parameters, parameter types and parameter sets that you know from cmdlets. However, it...

read more

Creating Shares Remotely

Let's assume you need to access another machine's file system but there is no network share available. Provided you have local administrator...

read more

Opening MsgBoxes

Need a quick message box to display something or ask a question? Fortunately, PowerShell can access old COM components. Here's a line that...

read more

Finding Driver Information

driverquery.exe returns all kinds of information about installed drivers, but the information seems a bit useless at first: PS> driverquery.exe...

read more

Adding New Lines to Strings

In a previous tip you learned that text arrays can easily be multiplied. The same is true for assignment operators such as +=. When you apply this...

read more

Asking for Credentials

When you write functions that accept credentials as parameters, add a transformation attribute! This way, the user can either submit a credential...

read more

Use Dumping Help

You can start by dumping all Help information into a file to learn more about a PowerShell cmdlet. You can then read all details about the cmdlet...

read more

Use the CTRL+Arrow

Inside the PowerShell console, you can hold CTRL while pressing the arrow key to move the cursor word-by-word. This way, you can move the cursor...

read more

Change Service Startmode

You can use WMI like this if you want to change a service start mode: ([wmi]'Win32_Service.Name="Spooler"').ChangeStartMode('Automatic').ReturnValue...

read more
1 95 96 97 98 99 130