2
votes
1answer
186 views

Is there a cmd/certutils to copy a certificate from one store to another?

I would like to know if there is a cmd to copy an existing certificate from one store to another. I am trying to copy a certificate from the Users Intermediate Certification Authorities store ...
2
votes
3answers
1k views

Export Windows Server configuration to powershell script?

I'm looking for a way to export role/feature configuration to a scriptfile, like powershell. Lets say you've installed the DHCP-Role. You configure the scopes, reservations and all that stuff you ...
2
votes
5answers
6k 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
1
vote
7answers
5k views

how to get MAC address of remote computer

I have specific situation. I want to get MAC address from a remote computer, which is not in domain. I know the hostname and IP address of the remote computer. The IP Address of my computer is ...
3
votes
1answer
530 views

Why powershell runs executables in separate window?

On one of my servers (2008 R2) powershell refuses to run executables without extension, so typing cmd (or &cmd) in command prompt results in folowing error message: The term 'cmd' is not ...
4
votes
6answers
13k views

How do I set an environmental variable from a powershell command?

I want to have a environment variable that contains the day of week in cmd.exe. When I run this command I get the result I want. C:\Users\tisc>powershell (get-date).dayofweek Friday Here I'm ...
5
votes
6answers
2k views

How do I monitor who's logged in?

We in our department are implementing a new admin policy: everyone in a department which we support will receive admin access to their computers. We need to know (while we are performing this "pilot ...
0
votes
1answer
118 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
5k views

Looking to add the “Log On as a service” right to an account via the command line

I am looking to make a user from the command line with minimal rights to run a service. cmd.exe or powershell.exe are both options, but cmd.exe is preferable. So far I got this: net user /add ...
2
votes
2answers
458 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 ...
5
votes
11answers
56k views

Windows command prompt: how to get the count of all files in current directory?

What command would you use in cmd.exe to find the number of files in the current directory? Is there a powershell option here? Update: I was hoping to avoid dir, as I know there are 10,000+ files in ...