Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8974813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:45:01+00:00 2026-06-15T18:45:01+00:00

This script works great to accept some read-host prompts and create a website with

  • 0

This script works great to accept some read-host prompts and create a website with an app pool tied to it. The password prompt works except our most common password is !$Pass!123!! and it will not allow me to receive it as input. How do you allow these characters to be used?

Import-Module WebAdministration
# Get Web Site Variables
$WebSite = Read-Host -Prompt "DNS name for Web Site"
$AppPoolName = Read-Host -Prompt "Application Pool Name"
[string]$AppPoolUser = Read-Host -Prompt "Application Pool Username Domain not required ex. PXML.Proxy$"
$Password = Read-Host -Prompt "Application Pool Account Password, try ` before $ in password"
$HostHeader = Read-Host -Prompt "Host Header Name"
# cmd /c C:\scripts\BaseIIS.cmd $WebServer $AppPool $AppPoolUser $Password $HostName
New-Item -path d:\Websites -itemtype directory
New-Item -path d:\Logs -itemtype directory
New-Item -path d:\Logs\$WebSite -itemtype directory
New-Item -path d:\websites\$WebSite -itemtype directory
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:45:02+00:00Added an answer on June 15, 2026 at 6:45 pm

    The problem in the input isn’t the dollar sign($) but the starting exclamation mark(!)
    You need to escape it with another one.

    You password need to be inputed as: !!$Pass!123!!

    Read here to know more about this

    Why not using get-credential cmdlet:

    $cred = Get-Credential -Message "Insert Username and Passsword"    
    $cred.GetNetworkCredential().UserName
    Jacob    
    $cred.GetNetworkCredential().Password
    !$Pass!123!!
    

    or you can use:

    $Password = Read-Host -Prompt "Application Pool Account Password" -assecurestring
    [String]$Password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($Password))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using following JavaScript/Ajax to read page content, This script works great but
I use this script to show an additional language menu additional, which works great
This code is the core of a much larger script that works great in
I am using a script from this discussion: https://wordpress.stackexchange.com/a/14711/14649 It works great, but when
This script works great. I call it in top of my scripts. But if
I have this script that I am currently running that works great for all
So I have this contact script which works great in firefox but whenever anyone
I need to use this script for a website gallery: http://webdesignerwall.com/tutorials/html5-grayscale-image-hover/ This works great
I have this current script which works great for changing class names $('#mydiv li
I've got this script $(date +%Y-%m-01) -$i months +%Y-%m)-01 that works great for getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.