multiple parameters within powershell

Posted on 2013-02-06
Last Modified: 2013-02-06
Hi im looking to set 2 parameters within this function. I have $setrecieveconnector  but also want to change the IP to a param. Whats the best way to go about it. Thanks

function setrecieveconnector {
set-ReceiveConnector -Name 'Default $setrecieveconnector' -Bindings ''
Question by:cwstad2
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

Accepted Solution

coraxal earned 250 total points
ID: 38858774
You can try this:
function setrecieveconnector {
	set-ReceiveConnector -Name "Default $setrecieveconnector" -Bindings "$IPAddress:25"

Open in new window

LVL 40

Assisted Solution

Subsun earned 250 total points
ID: 38858778
function setrecieveconnector {
set-ReceiveConnector -Name "Default $($setrecieveconnector)" -Bindings "$($ip):25"

Open in new window

LVL 15

Author Closing Comment

ID: 38859091

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Powershell Script - Set Windows Updates 2 32
Fraud Email 22 83
Offline address book Exchange 2010 Warning 30 29
Import CSV with All modify groups 17 45
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
In a recent question ( here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

726 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