4
votes
3answers
483 views

How can I create a windows shutdown script from powershell/command-line?

I've read the TechNet pages that describe using computer/user startup/shutdown scripts, and that's great, but I'd like to create those scripts via the command-line (and not have to click around in ...
2
votes
1answer
117 views

Windows 2008 Server R2 Command Prompt/Power Shell Slow Scrolling

I'm having an issue with various Windows 2008 Server R2 machines scrolling very slowly using the command line or Power Shell. For instance, if I type "dir", I see my contents being displayed 1 line at ...
1
vote
1answer
64 views

How do I pull up a command prompt on an Azure Website instance?

I am running an instance of the Ghost blogging platform on Azure. Setting it up was simple, I used a template from the gallery and it was set up in no time. FTP'ing into it to do work like template ...
1
vote
1answer
441 views

Full Information from Terminal Services Manager (tsadmin.msc) via command line

I would like to get the full session information that is presented in the Terminal Services Manager via the command line or PowerShell (so that it can be used in automation) or at the very least the ...
1
vote
3answers
882 views

In PowerShell, how can I parse a preformatted output?

Is there existing tooling to take text-based output and pipe it to a dynamic object that can be queried as columns? Specifically, I'm invoking .. query session /server:MYSERVER .. which is ...
3
votes
2answers
174 views

Powershell - external command's parameter not accepted

This seems like a simple problem but I am unable to fix it Running dfsutil command in shell returns result C:\Windows\system32>dfsutil link "\server.domain.com\DFSRootname\Sharename" Link ...
0
votes
1answer
67 views

single or set of patches from windows update?

Is there a way to install several patches by kb or other means and only install those specific without manually downloading the patches? I want to use automatic update services but don't want every ...
1
vote
1answer
641 views

How to enable SMTP server in Windows Server 2012

We are using servermanager.exe to install smtp server in windows 2008R2 from comand prompt. Is there any alternate to servermanager.exe? How to enable smtp server in windows 2012 from command prompt? ...
0
votes
1answer
1k views

How can I run an elevated powershell script as part of VMWare Customization Specification?

Background / Goal I have a VMWare template that I am deploying and I am using VMWare's "customization specifications" to perform many of the sysprep tasks. The last thing I need to accomplish is ...
1
vote
1answer
169 views

How to dump certificate file from installer via command-line?

I'm building a script that will download and install a bunch of programs. One of those programs depends on a virtual driver, which needs its certificate to be imported in order to function. Normally, ...
1
vote
3answers
1k views

Using command line to see if a given computer's local guest account is disabled

I need to generate a report that shows the guest account is disabled for a given list of computers. How can I use net user, powershell, or any other commonly used tool for this purpose?
2
votes
5answers
7k views

command line - switch to administrator mode

Is it possible to switch from normal mode to administrator mode in command line? I don't want to open command line by right clicking and selecting "run as administrator". Thanks
4
votes
1answer
479 views

PHP Apache XAMPP Run Multiple Scripts from CLI in Background

How can I simultaneously run dozens of PHP scripts in the background from XAMPP's command line interface? Someone suggested a batch file, but when I tried executing this: start php 1.php start php ...
3
votes
2answers
1k views

Is there a .history file on Windows machines?

Is there an auditable file on a Windows machine that shows the command-line history for either cmd or PowerShell? On UNIX machines I believe there is a hidden file in the home directory called ...
8
votes
2answers
1k views

Is there a way to show an RDP session's encryption level from the commandline/Powershell?

For Windows 2008, I need to create a script that will show whether connected RDP sessions are set at "high" encryption or something else (e.g., "compatible"). Does anyone know of a way to get this ...
1
vote
2answers
5k views

How can I escape double quote character for use in findstr on the PowerShell command line?

This command lines works running in cmd.exe: findstr /l /i /s /c:"key=\"Smtp" *.config However running in PowerShell 2 on Windows 7 Ultimate x64, findstr seems to freeze no matter which combination ...
5
votes
2answers
2k views

Installing an SSL Certificate in Windows Server 2008 using powershell

Is it possible to Install an SSL Certificate in Windows Server 2008 R2 using powershell? If it's not, is it possible with cmd command line? I am doing it with mmc now but would it be nice to do that ...
0
votes
1answer
119 views

PowerShell - type no inside every directory and open up notepad2

Do you know the notepad command in PowerShell or cmd.exe? I would like to do the same for NotePad2 I would like to type the following command inside PowerShell and open up the me.txt file; PS ...
5
votes
1answer
1k views

Sudo !! equivalent in PowerShell

"Sudo !!" invokes previously executed command with administrator privileges in *nix shell. Is there an equivalent in PowerShell?
5
votes
2answers
6k views

Install .NET 4 via command line or PowerShell?

How do I install .NET 4 on Windows Server 2008 R2 from the command line or PowerShell? This post shows how to do it for .NET 3.5 using dism.exe and PowerShell. I am guessing that, since the .NET 4.0 ...
3
votes
3answers
3k views

Using ROBOCOPY to MOVE data around, not copy it

I have the following powershell script, which executes a few robocopy commands: ROBOCOPY.exe $q3 $q4 /R:5 /W:15 /S /NP /MT:32 /XA:SH /XJD ROBOCOPY.exe $q2 $q3 /R:5 /W:15 /S /NP /MT:32 /XA:SH /XJD ...
4
votes
2answers
388 views

powershell or bat - counting files in all directories and subdirec

we have a hardrive with hundreds of thousands of files i need to figure out how many of every file extension we have how can i do this with windowspowershell or command prompt or what ever else is ...
14
votes
4answers
22k views

Recycle remote IIS app pool from the command line?

Is it possible to recycle an IIS7 app pool from the command line, on a different machine? I've found APPCMD (appcmd recycle apppool my-app-pool), but it only operates on the host it's run on, AFAICT. ...
0
votes
2answers
1k views

powershell run java process problem

I'm trying to run a java process via Powershell in Windows XP. Here's the command: java.exe -cp .;./common.jar -Dcontext=atest1 -Dresourcepath=. DW_Install So, the classpath is . and .\common.jar ...
1
vote
1answer
774 views

Powershell; pipe stdout to commandline

As an example, I would like the following commands to put a dir listing with all subdirectories to StdOut @' >> -R >> '@ > .\test >> dir `test` So, after the first four lines, ...
2
votes
2answers
467 views

Recursive CMD or BAT Windows Script

How can I create a BAT or CMD which will iterate through a folder tree and run same command agaists each folder file? E.g myexe.exe C:\Documents and Settings\folder1\filename.txt myexe.exe ...
2
votes
2answers
373 views

ACL Monitoring & Reporting

I need a tool/script that will report currently defined permissions for a given path. If the permissions for a subtree are the same as for its parent, the whole subtree should be omitted. Files ...
3
votes
2answers
9k views

How to launch PowerShell script from the OS command line?

I have a PowerShell script for building my project files, and I'd like to have capability to run it from my file manager's command line (and, possibly, make a shortcut to this script so I can start ...
1
vote
4answers
4k views

Powershell unable to “see” dnscmd.exe

Am at a complete loss with this one. Recently a number of my powershell scripts have started failing as they are unable to find the command dnscmd.exe. What has me at a loss is that the executable ...
1
vote
3answers
5k views

How can I run a command window hidden or minimised?

I have written a powershell script which generates a "EULA" type popup which the user has to agree to. It does this at logon by running as a scheduled task for a user (non-admin) account. It needs to ...
2
votes
2answers
1k views

Power Shell does not like command

Any ideas what I did wrong here? I copied this script from a tutorial and get this error.... PS C:\Windows\system32> Get-Service | Where-Object ($_.status -eq "running") Where-Object : Cannot ...
0
votes
1answer
3k views

Windows 08 R2 Backup : create task template

it is possible to create a backup template or somehow configure backup shedule besides regular daily backup to local disk. I want to backup whole system every sunday to shared network folder. I must ...
4
votes
2answers
6k views

How to enumerate network computers from command line?

I am on Windows XP and would like to enumerate the computers that exist on my network from a command line. I would like to enumerate them such that I can use the host names in another command, pslist ...
0
votes
2answers
3k views

PowerShell/Command Prompt - Create folders from AD group members

Is there a simple script I can use to give a destination folder and the AD group I want to use and it would generate a set of folders with the members of that AD group and delegate the proper ...
2
votes
2answers
503 views

Simplifying powershell cmdlet

I have a powershell cmdlet (move-IMAPMailboxToExchange) that requires a lot of repetition to enter. I want to call it with another batch/powershell script that just takes two args from the command ...
82
votes
8answers
74k views

How to zip/unzip files in Powershell?

Is there a one-liner that will zip/unzip files (*.zip) in PowerShell?