Category "powershell-2.0"

How do I get a file path without filename in PowerShell?

I have C:\Temp\MyFolder\mytextfile.txt in a variable called $file I want C:\Temp\MyFolder\ in another variable.

Invoke-Command with -credentials

I want to invoke a command on a remote server, I do not want to have to put in the password to run the script. I've tried encrypting the password and storing it

Download files from SFTP server using PowerShell

I need to download files from SFTP server to a local machine using a PowerShell script. The API/library that will be used for the download needs to be able to

Is there a way to make a PowerShell script work by double clicking a .ps1 file?

I am distributing a PowerShell script to my team. The script is to fetch an IP address from the Vsphere client, make an mstsc connection, and log it in a shared

Using Invoke-Command -ScriptBlock on a function with arguments

I'm writing a PowerShell script that will execute commands on a remote host using Invoke-Command and its -ScriptBlock parameter. For example, function Foo {

Using Invoke-Command -ScriptBlock on a function with arguments

I'm writing a PowerShell script that will execute commands on a remote host using Invoke-Command and its -ScriptBlock parameter. For example, function Foo {

How do I get only directories using Get-ChildItem?

I'm using PowerShell 2.0 and I want to pipe out all the subdirectories of a certain path. The following command outputs all files and directories, but I can't f

Creating/Duplicating a Certificate Template with Powershell

I want to create a template using powershell but I cannot seem to figure out how to set a Minimum Supported CA for the template. I was never able to figure out

Creating/Duplicating a Certificate Template with Powershell

I want to create a template using powershell but I cannot seem to figure out how to set a Minimum Supported CA for the template. I was never able to figure out

Creating/Duplicating a Certificate Template with Powershell

I want to create a template using powershell but I cannot seem to figure out how to set a Minimum Supported CA for the template. I was never able to figure out