Convert-ToSecureSting ampersand issue powershell

I have the following code -  $Password = 'Test&&' $securePassword = ConvertTo-SecureString $Password -AsPlainText -Force $cred = New-Object System.Management.Automation.PSCredential($userName,$securePassword) Add-AzureAccount -Credential $cred
I am unable to connect to my Azure-Account if I set my password having '&' in it. I am not sure does the Convert-To is treating & as any special character.
Setting other special character such as '%' in the password works smoothly for me.
I have tried applying escape characters before '&' in my password but it didn't worked.
Any help would be highly appreciated on this.

Hi,
What is the error message when you use the & character in your password?
Regards.
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Similar Messages

  • JDev 10.1.2 : ampersand eacute; converted to ampersand amp;eacute;

    Hello all,
    I am writing an interface that will offer to the users the possibility to enter standard HTML escaping sequence for accentuated characters like for example <ampersand>eacute; (because they do not have this particular character on their keyboard). Those characters are stored as-is in an Oracle database.
    When using interfaces developed with JDev 10.1.2, either with uix or jsp, those characters are well extracted from the database but are converted at display time to <ampersand>amp;eacute; (this is visible in the html source code of the page). This makes those characters displayed as <ampersand>eacute; to the user, where I would like them to be displayed as é (this conversion should be done automatically by the browser if the original character has not been modified by the interface).
    Is there a way with JDev to make a particular field of the database be displayed without being translated (<ampersand> converted to <ampersand>amp;)? Or is there any workaround to this issue?
    Here is the code of my interface (.jsp generated with JHeadstart, but this seems to be more a JDev issue):
    <td class="prompt" nowrap="nowrap">Description</td>
    <td nowrap="nowrap">
    <c:out value="${bindings.InstituteDescription}"/>
    </td>
    Thanks in advance for your reply.
    David

    By default <c:out/> tag "escapes" the output, option escapeXml is implicitly true
    To change this behaviour add the option: escapeXml="false"
    In your case:
    <c:out value="${bindings.InstituteDescription}" escapeXml="false"/>
    Hope it helped.
    Regards
    Fred

  • Jhs 10.1.2 : ampersand eacute; converted to ampersand amp;eacute;

    Hello all,
    First of all congratulations to the whole team of JHeadstart for the great job you are doing. I am evaluating different products to generate standard to complex database interfaces and Jhs looks very promising to me.
    Now on with the trouble: my interface will offer to the users the possibility to enter standard HTML escaping sequence for accentuated characters like for example <ampersand>eacute; (because they do not have this particular character on their keyboard). Those characters are stored as-is in an Oracle database.
    When using JHeadstart generated interfaces, either with uix or jsp, those characters are well extracted from the database but are converted at display time to <ampersand>amp;eacute; (this is visible in the html source code of the page). This makes those characters displayed as <ampersand>eacute; to the user, where I would like them to be displayed as é (this conversion should be done automatically by the browser if the original character has not been modified by JHeadstart).
    Is there a way with JHeadstart to tell that a particular field of the database should not be translated (<ampersand> converted to <ampersand>amp;)? Or is there any workaround to this issue?
    Thanks in advance for your reply.
    David

    David,
    Thank you for the kind words, and you haven't seen 10.1.3 yet :-)
    You can achieve what you want by telling the UIX item to not escape html characters. You do this by using a <rawText/> element rather than the generated messageTextInput element.
    In 10.1.2, you need to make this change post-generation, and then switch off page generation for this group to preserve your post-generation change.
    In 10.1.3 you keep your page generatable by creating a custom item template for all items in your app that should not escape html.
    Steven Davelaar,
    JHeadstart Team.

  • Convert Code c# to powershell

    Hello
    I want to convert this code in powershell:
    int counter = items.Count;
    for (int i = 0; i < counter; i++)
    //if (items.Count > 0)
                                SPListItem
    newItem = listTo.AddItem();
    if (items[i]["Mois"].ToString() ==
    "Janvier" && items[i]["Annee"].ToString() ==
    "2013")
                                    newItem["Mois"]
    = items[i]["Mois"];
                                    newItem["Title"]
    = items[i]["Title"];
                                    newItem["Nom"]
    = items[i]["Nom"];
                                    newItem["AssignedTo"]
    = items[i]["AssignedTo"];
                                newItem.Update();
    thx

    Hi,
    According to your post, my understanding is that you want to transfer C# code to PowerShell Command.
    You can transfer language using .NET Reflector directly.
    Here are some detailed articles for your reference:
    http://blog.lekman.com/2011/10/converting-c-to-powershell.html
    http://reflectoraddins.codeplex.com/releases/view/1805
    http://reflectoraddins.codeplex.com/wikipage?title=PowerShellLanguage&ProjectName=reflectoraddins
    Best regards,
    Zhengyu Guo
    Zhengyu Guo
    TechNet Community Support

  • Export to PDF- Colour Setting-------Convert to Destination Issue

    Have recently synchronized all colour management in adobe CS, after creating new output destination profiles for printing press. All seems well and good when photoshop files are in an kept in RGB with original source profiles. They convert to destination CMYK profile successfully.
    However if any of the images are in CMYK with a profile embedded, the end PDF does not convert these to new profile.
    According to the info that appears in pop up info when you hang cursor over 'Convert to Destination(Preserve numbers' on the export options for PDF, it says that any image with a profile will be converted to destination.  This does not seem to be happening, its almost as if the image has not got a profile attached, in which case it should then preserve numbers. I went back to double check file to see if this was the case, but the profile is definitely embedded. The only thing that rings slight alarm bells is that i the link info  for profile in Indesign, it says NA (Not Applicable).
    Can some prepress work flow expert and colour management guru please help.

    Doh!!! I am about to answer my own question, I have resolved this issue.
    In my colour settings in indesign  in the CMYK box in the Colour Management Policies
    I had 'Preserve Numbers (Ignore linked profiles)' checked. I have now changed this to 'Preserve embedded'
    I get it now! I was afraid to use preserve embedded in case it did not change on the destination. It seems it does. I got the terminology the wrong way round.  I hope this has helped somebody else other than me.
    Thanks all!!

  • UOM Convertion in GR Issue

    Hello Gurus,
    I have a material that have the next UOM:
    1 PC (BUM) = 3 BAG
    When I make a GR (mov. 261) for this material in 1 BAG (UOM at the BOM) the system makes the convertion to PC and discounts 0.333. See the next example:
    Initial Stock:         1        PC = 3 BAG
    GR ( - 1 BAG):    0.667 PC = 2.001 BAG
    So, at the end I have a little surplus that obviously doesn't exists.
    Is there any possibility for fix this? Can the system discounts 1/3 instead of 0.333?
    Thanks in advance.

    Hi
    I once had this issue in one of my projects. I'm afraid, as far as I know, this is the standard SAP, UoM can only accomodate 3 digits of decimals.
    Thus, when you define the Base UoM not with the smallest unit, you will face this kind of case where SAP will round the qty, resulting in an excess in stock (when physically it doesn't exist).
    My advice is, you should define the smallest unit as the base UoM, so this problem will not arise.
    Or, for material which already have this problem, you should do adjustment at least every month for this qty rounding problem.

  • Scripting System Preferences - Ampersand Issue

    Hello,
    I'm trying to make an AppleScript to quickly change a bunch of System Preferences.  I've gotten most of them set up fine, but when I attempt to click the "Users & Groups" button, AppleScript can't find it.
    tell application "System Preferences"
    activate
              set current pane to pane "com.apple.preference.desktopscreeneffect"
    end tell
    tell application "System Events"
              tell process "System Preferences"
         click button "Users & Groups" of scroll area 1 of window "System Preferences"
    I think it may have something to do with the ampersand in the string, but I didn't have this problem with selecting "Security & Privacy" at another point in the code.  I've checked the UIElementInspector and it tells me that the title is indeed "Users & Groups" for the button, but it breaks the line after the ampersand like so (this doesn't happen with "Security & Privacy"):
    <AXApplication: “System Preferences”>
    <AXWindow: “System Preferences”>
      <AXScrollArea>
       <AXButton: “Users &
    Groups”>
    Thanks in advance!

    There are two problems with your script, as presented.
    First, since you select the Desktop & Screen Effect preference pane in line 3, the rest of the script is doomed to fail since there is no 'window "System Preferences" - it's now called "Desktop & Screen Saver" (or whatever your localized version is called), and there is no button to click.
    Assuming you resolve that (e.g. by removing the 'set current pane...' line, the second problem is hinted at by your UIElementInspector output.
    You see, there is no button called 'Users & Groups'. The actual button is called
    "Users &
    Groups"
    - yes, there is a return after the ampersand, not a space - this isn't an issue of simple text wrapping.
    Therefore you want to:
                        click button "Users &
    Groups" of scroll area 1 of window "System Preferences"

  • Programmatically Added Web Part Issues - Powershell

    Hello!
    I have been doing quite a bit of research on this for the last few days but so far to no avail. What I am trying to do is use a powershell script to create a Content Editor Web Part on a basic sharepoint site created using the Team Site template. 
    The issue I'm running into is when I use the script I have to add a new web part to the "wpz" zone. The webpart gets created properly and exists in the webparts collection however it does not show up on the page. I can bind to the webpart through
    powershell and can see that the visible property is set to true while the hidden property is false. The webpart is not closed it simply doesn't show up. 
    When I add the webpart to another zone it shows up properly however as soon as you edit the page the webpart disappears. However this only happens while the page is in edit mode. As soon as you save the page the programmatically added webpart immediately
    shows back up in the zone it's supposed to be in. 
    I was wondering if anyone else had ever experienced this specific issue and if there is anything I can do to fix it.
    The environment is a development box running Microsoft Server 2012 and is hosting Sharepoint 2013. 
    Thanks!

    Hello Patrick,
    Thanks for your response. The script I am using is in the following code block:
    $SiteUrl = "http://maddevsp01.btdev.net/my/personal/14736"
    $WebUrl = "http://maddevsp01.btdev.net/my/personal/14736"
    function main() {
    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    $OpenWeb = Get-SPWeb $WebUrl
    $OpenSite = Get-SPSite $SiteUrl
    $file = $OpenWeb.GetFile("$WebURL/SitePages/Home.aspx")
    $WebPartManager = $file.GetLimitedWebPartManager([System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
    Add-ContentEditorWebPart "$WebURL" "$WebURL/SitePages/Home.aspx" "wpz" 12 "Test" "Test webpart"
    $OpenWeb.Dispose()
    function Add-ContentEditorWebPart($SiteURL, $pageUrl, $webpartzone, $index, $title, $content)
    $site = new-object Microsoft.SharePoint.SPSite($SiteURL)
    $web=$site.OpenWeb()
    $webpartmanager = $web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
    $webpart = new-object Microsoft.SharePoint.WebPartPages.ContentEditorWebPart
    $webpart.ChromeType = [System.Web.UI.WebControls.WebParts.PartChromeType]::Default;
    $webpart.Title = $title
    $docXml = New-Object System.Xml.XmlDocument
    $contentXml = $docXml.CreateElement("Content");
    $contentXml.set_InnerText($content);
    $docXml.AppendChild($contentXml);
    $webpart.Content = $contentXml;
    $webpartmanager.AddWebPart($webpart, $webpartzone, $index);
    $web.Close()
    $site.Close()
    function Get-SPSite([string]$url) {
    New-Object Microsoft.SharePoint.SPSite($url)
    function Get-SPWeb([string]$url) {
    $SPSite = Get-SPSite $url
    return $SPSite.OpenWeb()
    $SPSite.Dispose()
    main
    I was investigating further after posting yesterday and used powershell to bind to a webpart created by the script and a webpart I created using the sharepoint interface. Then I exported all the properties and their values to two different text files and
    used winmerge to compare the differences to see if there was a setting I was missing in the script or something akin to that. However when I did the comparison the only differences between the two were the following values: Title, Description, PartOrder, ID,
    StorageKey, EffectiveTitle, DisplayTitle, ZoneIndex, ClientID, and UniqueID. All of which you would expect to be different. All other settings are exactly the same on both webparts.
    I am at a complete loss as to what this issue might be.
    Kindest Regards,
    -Zach

  • Batch convert Raw files to DNG via Library's convert to DNG issue

    I have LR 4.4 running on a Win 7 64 bit PC...
    I selected 4 RAW files (CR2) to convert to DNG via the Library modules 'convert to DNG' and then delete the CR2 file.
    It converted only the last of the 4 files and left the other 3 untouched as CR2 files.  Can LR not batch convert the RAW files in this manner??
    Dave

    I tried again to convert the remaining 3 CR2 files to DNG by selecting the 1st file and shift clicking on the 3rd file in the film strip and then via 'Library-Convert photo to DNG.  I have Delete originals after conversion checked.
    This time it converted the 1st file and left the other 2 unchanged.  It seems to perform the operation on the 1st file selected...the first time when I tried this on the 4 original files I had clicked on the last file and then shift clicked on the first on in the series.
    BTW...I have LR4.4, Win 7 64-bit, 16G ram, Pentium 7...
    For what it's worth, I also noticed that when I "round-trip" a file to CS6 and then SAVE the file it should bring me back to LR with the new file placed next to the old one in LR.  Mine does not.  The new file is not shown and I have to synch and add photo's to have it show in LR.  Another issue...
    Thanks for checking on your end.  I suspected LR should properly batch the conversion as it did for you and that I had an issue.  With the Nik suite and Perfect Effects 4 installed I'm hoping not to have to do a complete uninstall/reinstall...what a pain (sigh).
    Dave

  • How to make SharePoint 2013 convert License type in PowerShell?

    How create script for passing Product Key for converting farm license type for Sharepoint 2013 like it is describied below:
    http://macslui.blogspot.com/2013/02/sharepoint-2010-convert-license-type.html

    How create script for passing Product Key for converting farm license type for Sharepoint 2013 like it is describied below:
    http://macslui.blogspot.com/2013/02/sharepoint-2010-convert-license-type.html
    All of the methods for licensing are marked internal, so without reflection you wouldn't be able to set the license via PowerShell.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • IFD to XDP convertion Span tags issue...

    Hi,
    When we convert the IFD (Adobe output designer-5.6) to XDP through Adobe livecycle ES, some unicode special characters included to the XDP file between <span> tags.
    like, <span style="xfa-spacerun:yes">ô </span>
    It results, special characters printed on form.
    Let us know, how to rectify the issue.
    Regards,
    Sasi

    Hi Frank,
    Thanks for your answer. Only been using ADF for a month now so a lot to be learned!
    I am styling using CSS and skins (very confusing how ADF does this but thats another matter all together) but concerning my query on how to centrally vertical and horizontally align components within a button. How would I achieve this desired effect if the use of 2 span tags is not allowed/suggested in ADF. The af:outputText tag doesn't seem to implement span tags as I would have thought.
    Any help would be very appreciated as searching the internet it would seem the use of the 2 classes on span tags is the best cross browser solution.

  • Help converting WBAdmin command into powershell

    I am having a bit of trouble converting Windows Server Backup commands on a 2012 R2 server into powershell.
    The first command is to restore the catalog from a portable drive.  The batch file version is:
    wbadmin restore catalog -backupTarget:\\?\Volume{58895c2e-a4f6-4143-8be0-83c85hhhhhh}\ -machine:MyHost -quiet
    My attempt to convert this to powershell is:
    $Bt="\\?\Volume{58895c2e-a4f6-4143-8be0-83c85hhhhhh}\"
    Restore-WBCatalog -BackupTarget $Bt -Force
    But this fails with "Cannot bind parameter 'BackupTarget'"
    We then have the line:
    $version=@(Get-WBBackupSet)[-1].VersionId
    Which retrieves the versionId of the most recent backup ok.
    The last line we need to convert to powershell is:
    wbadmin start recovery -version:$version -itemtype:File -items:k:\Data1.vhdx -backupTarget:\\?\Volume{58895c2e-a4f6-4143-8be0-83c85hhhhhh}\ -machine:MyHost -recoveryTarget:k:\ -overwrite:Overwrite -quiet
    Thanks,

    Try changing this:
    $Bt="\\?\Volume{58895c2e-a4f6-4143-8be0-83c85hhhhhh}\"
    to this:
    $Bt='\\?\Volume{58895c2e-a4f6-4143-8be0-83c85hhhhhh}\'
    ¯\_(ツ)_/¯
    Tried that but still same problem.  Actual error message is:
    Restore-WBCatalog : Cannot bind parameter 'BackupTarget'. Cannot convert the
    "\\?\Volume{58895c2e-a4f6-4143-8be0-83c858hhhhhh}\" value of type "System.String" to type
    "Microsoft.Windows.ServerBackup.Commands.WBBackupTarget".
    At X:\System\Restore.ps1:2 char:33
    + Restore-WBCatalog -BackupTarget $Bt -Force
    +                                 ~~~
        + CategoryInfo          : InvalidArgument: (:) [Restore-WBCatalog], ParameterBindingException
        + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.Windows.ServerBackup.Commands.Restore
       WBCatalog

  • Jsf newbie :: converter and navigation issues

    Hi,
    Iam facing a problem in my first jsf application.
    Iam using jsf 1.1 and tomcat 5.5.7
    I have a UserBean with a single attribute userName (which has public getter and setter methods).
    * I have an index.jsp that redirects to login.faces.
    * I have the appropriate servlet url-mapping in my web.xml that maps *.faces to the FacesServlet
    Here's the code for login.jsp
    <f:view>
       <h:form>
             <h3>Please enter your name </h3>
         <table>
          <tr>
              <td>Name:</td>
            <td><h:inputText id = "name" value="#{user.userName}"/></td>
         </tr>               
         </table>
         <p><h:commandButton value="Login" action="welcome"/>
         </p>
         </h:form>
       </body>
    </f:view>Next I have a welcome.jsp which simply outputs Hello <userName>
    <f:view>
      <h:form>
         <h:outputText value="#{user.userName}"></h:outputText>
      </h:form>
    </f:view>And this is my faces-config.xml
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
         <managed-bean>
              <managed-bean-name>user</managed-bean-name>
              <managed-bean-class>com.myjsf.UserBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
         <navigation-rule>
              <from-view-id>/index.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>welcome</from-outcome>
                   <to-view-id>/welcome.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
    </faces-config>Now when I start my application , the index page redirects me to login.faces. I believe the FacesServlet intercepts this call, strips of .faces and forwards to login.jsp. Login.jsp is displayed correctly, so far so good. However from here on, I have all kinds of problems
    1. Should the <from-view-id> be /index.jsp (my actual url) or /login.jsp (the url to which index.jsp forwards me to). Actually both seem to work (or not work depending on how you look at it :( )
    2. Anyways whatever I set it to, the login.jsp is displayed correctly. The action attribute of the commandButton tag is set to 'welcome' which matches with the <from-outcome> value in navigation rule in faces-config.xml and I would have expected the welcome.jsp to load on form submit.
    But the form just reloads itself on clicking submit.
    I googled around and discovered that this may be due to validation errors or conversion errors and adding <h:messages/> would indicate the error source. AQccordingly I added it and got this o/p
    " "name": " Conversion Error setting value 'Duke' for 'null Converter'. To cut a long agony story short, I found that I have to define a converter for some data types for validation and/or display. But all I have is a String property. Doesnt jsf provide a default Converter ?
    3. I couldnt get my app to work when I put my jsps in a folder and access them as /<foldername>/jsp in my faces-config.xml. Isnt this possible ? Should all jsps be under the root folder ?
    Will be thankful for any help.
    cheers,
    ram.
    2. Whenever I click on

    Thanks for the reference , I shall definitely go through it.
    My immediate concern is to get the first program working.
    Here is my source code for the bean.
    package com.myjsf;
    import java.io.Serializable;
    public class UserBean implements Serializable {
        private String userName;  
        public String getUserName() {
            return userName;
        public void setName(String userName) {
            this.userName = userName;
    }Here's my login.jsp which comes up fine
    <f:view>
       <h:form>
         <h:messages/>
             <h3>Please enter your name.</h3>               
                 Name: <h:inputText id = "userName" value="#{user.userName}"/><br>
                  <h:commandButton value="Login" action="welcome"/>
         </h:form>
      </f:view>Here's my faces-config.xml
    <faces-config>
         <managed-bean>
              <managed-bean-name>user</managed-bean-name>
              <managed-bean-class>com.myjsf.UserBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
         <navigation-rule>
              <from-view-id>/login.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>welcome</from-outcome>
                   <to-view-id>/welcome.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
    </faces-config>     And this is the error that I get
    "userName": Conversion error occurred. The page gets displayed again. One thing I noticed was that in the html - view source the action attribute of the form tag is set to /myjsf/faces/login.jsp. Shouldnt it be welcome.jsp rather ?
    Iam at my wits end. I have decided to write a Converter which may solve my problem, but is it required ?
    Please help.
    Thanks,
    Ram.

  • Black magic SDI to analog converter box code issue

    Hello im using an SDI to analog converter box from black magic and since i was using it to test some other stuff I guess i got the code worng now but don remember what it was. As of right now its only displaying some lines although i can kinda see through and im seeing what the back ground is and it its what im trying to display. 
    This topic first appeared in the Spiceworks Community

    I wanted to let you know that I made a practice dvd today, sampling edited clips from four different sources of imported vhs video--some of it 16mm dubbed to video around 20 years ago--into iMovie. I worked in the update of 6 to see if the application had stabilized at all. I've been working only in 5.0.2 recently.
    I was pleasantly shocked at how much better the video quality was than on the computer--as you foretold. I really couldn't tell a visual difference from the source videos. What a relief! But do you work with that disparity, the difference between computer and TV, without a live TV monitor as you go? It's hard to make decisions on the basis of how it looks on the computer.
    Other encouraging news: the garble around the edges didn't show at all on the TV screen. In the meantime, I'd been trying the plug-in you recommended. I'm glad I won't need to it for all this video after all, but I'm curious to experiment more with it. Any other plug-ins you'd recommend?
    Thanks again for your generous response.
    On a roll,
    BnB

  • Acrobat X Standard Printing/Converting Web Page Issues

    Running Chrome 17.0.963.46 beta-m. 
    Acrobat is not printing/converting pages correctly. See screeen capture below:

    Chrome printing isn't great. Do you see the same problem when you print to a physical printer?
    One option is to take the URL, open Acrobat and try coverting from file>Create PDF>From web page

Maybe you are looking for