[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Missing expression after ','

Posted on 2012-04-02
Medium Priority
Last Modified: 2012-04-02

When I execute :
      [string]$A = "",
      [string]$I = "",
      [string]$S = "",
        [string]$g = "",
        [string]$T = "",
        [string]$f = "",
        [string]$u = "",
        [string]$up = "",
        [string]$c = "",
        [string]$cp = "",
        [string]$v = "",
        [string]$ip = "",
        [string]$r = "",
      [switch]$Help ,

$net = new-object -ComObject WScript.Network
$net.MapNetworkDrive("z:", "\\server", $false,`"$u`", `"$up`")

The following error is returned :
Missing expression after ','.
At C:\install_bin_1-0.ps1:45 char:75
+ $net.MapNetworkDrive("z:", "\\server", $false, <<<< `"$u`", `"$up`")
    + CategoryInfo          : ParserError: (,:String) [], ParseException
    + FullyQualifiedErrorId : MissingExpressionAfterToken


Question by:bibi92
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
1 Comment

Accepted Solution

Xizz earned 2000 total points
ID: 37795427
You are doing strange things for me here:

$net.MapNetworkDrive("z:", "\\server", $false,`"$u`", `"$up`")

I think it must be something like:

$net.MapNetworkDrive("z:", "\\server", $false,"$u", "$up")

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

This article will help you understand what HashTables are and how to use them in PowerShell.
A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

650 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