Link to home
Start Free TrialLog in
Avatar of halkuff
halkuff

asked on

PowerShell Novice Help Please

Hi, need to convert this statement to a Powershell Procedure that accepts user input and substitutes the user input for ITT
Then it should show what the new command would look like and ask for permission to execute

New-MailContact -ExternalEmailAddress 'SMTP:ITT@Bud.Tessco.Com' -Name 'ITT' -Alias 'ITT' -FirstName '' -Initials '' -LastName '' -OrganizationalUnit 'tessco.com/Migrated Users and Groups/PMDF'
Avatar of SubSun
SubSun
Flag of India image

Try this
$inputData = Read-Host "Input the data for New-MailContact"
New-MailContact -ExternalEmailAddress SMTP:$inputData@Bud.Tessco.Com -Name $inputData -Alias $inputData -FirstName '' -Initials '' -LastName '' -OrganizationalUnit 'tessco.com/Migrated Users and Groups/PMDF'

Open in new window

Avatar of halkuff
halkuff

ASKER

HI, the command would work for us but I was also looking for a procedure as outlined below...
ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of halkuff

ASKER

Works fine, thanks!