0
votes
1answer
55 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
170 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
625 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 ...
0
votes
1answer
98 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
513 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?
1
vote
5answers
654 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
232 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
427 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
651 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
2k 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
1k 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
106 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
805 views

Sudo !! equivalent in PowerShell

"Sudo !!" invokes previously executed command with administrator privileges in *nix shell. Is there an equivalent in PowerShell?
4
votes
2answers
3k 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
1k 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
306 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 ...
10
votes
4answers
13k 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
661 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
657 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
302 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
282 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
7k 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
3answers
2k 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
2answers
4k 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
709 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
2k 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
5k 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
489 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 ...
60
votes
7answers
51k views

How to zip/unzip files in Powershell?

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