Solved

I have a Powershell command that spans multiple lines but how do I execute it?

Posted on 2013-01-23
16
685 Views
Last Modified: 2013-01-24
I am trying to run a Powershell Command "makecert -n "CN=powershell local certificate root...." that spans a few lines.  I have no problem spanning the lines using the backtick, but I am then simply left with a >> prompt.  How do I then execute the command?
0
Comment
Question by:fuzzyfreak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
16 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 38809398
Press Enter key until you get the prompt..
0
 
LVL 16

Expert Comment

by:Dale Harris
ID: 38809406
Press Enter until the >> goes away.

Also, if your commands include Read-Host in them, you will end up not being able to execute the block of code because the next line will be the entry for the read host if that makes sense.

-Dale Harris
0
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 38809437
>> means the system is asking to enter more input.  You can press either Control C to cancel the operation or enter the inputs or press Enter until it goes
0
What, When and Where - Security Threats from Q1

Join Corey Nachreiner, CTO, and Marc Laliberte, Information Security Threat Analyst, on July 26th as they explore their key findings from the first quarter of 2017.

 
LVL 37

Expert Comment

by:Neil Russell
ID: 38809440
Check that you have all you " matched as if you have a quote but no close quote it can happen

Can you post whole command here
0
 
LVL 4

Author Comment

by:fuzzyfreak
ID: 38809460
Thanks, ENTER indeed was the answer here.  However if you see my attachment, you can see the command failed - page 1 shows you that I should be able to run the command as is, page 2 shows you that it failed - any obvious reasons why?
make-cert.pdf
0
 
LVL 40

Assisted Solution

by:Subsun
Subsun earned 500 total points
ID: 38809471
It says Makecert is not recognized as a command.

MakeCert is available as part of the Windows SDK, which you can download from http://go.microsoft.com/fwlink/p/?linkid=84091.

Reference : http://msdn.microsoft.com/en-us/library/aa386968%28v=vs.85%29.aspx
0
 
LVL 4

Author Comment

by:fuzzyfreak
ID: 38809494
Already downloaded and installed (SDK 2.0)
0
 
LVL 40

Expert Comment

by:Subsun
ID: 38809508
Try with path to MakeCert.exe file..
For example..
C:\temp\MakeCert.exe ......
0
 
LVL 4

Author Comment

by:fuzzyfreak
ID: 38809532
OK, I appear to have been misinformed - SDK 2.0 does NOT include makecert.exe.  could somebody please tell me the latest SDK that DOES contain makecert.exe - thanks.
0
 
LVL 40

Expert Comment

by:Subsun
ID: 38809576
Did you try the links from my previous post?
0
 
LVL 4

Author Comment

by:fuzzyfreak
ID: 38809603
My apologies, thanks.  Now, can you tell me which component contains makecert so that I don't have to install every component, would it be windows native code development, .NET development or under common utilities?
0
 
LVL 40

Expert Comment

by:Subsun
ID: 38809748
I think it's in  windows native code development tools, but not sure..
0
 
LVL 4

Author Comment

by:fuzzyfreak
ID: 38810143
OK, that installer is failing.  I think it is because it does not support my OS - do you know which one supports Small Business Server 2011 standard?

Thanks
0
 
LVL 40

Expert Comment

by:Subsun
ID: 38810160
You can search SDK for Windows server 2008 R2 and download it..
0
 
LVL 4

Author Comment

by:fuzzyfreak
ID: 38813762
Sorry it has taken me a while to get back but I had to follow through some articles to get the SDK installed.  It turns out that you have to uninstall the MS Visual C++ 2010 x86 and x64 before you can install the SDK.  I took a pot shot and installed just the .NET development tools and it was bang on, giving me makecert.  I then went through a very long process of having to make my certificate, certifying a script and eventually getting to where I wanted to get to - took me the whole day.

I went home satisfied, which suggests the day was productive...with your help.

Thanks.
0
 
LVL 4

Author Closing Comment

by:fuzzyfreak
ID: 38813764
ENTER key was the answer to my original question.  Very grateful for off-topic assistance as well.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Synchronize a new Active Directory domain with an existing Office 365 tenant
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question