Script Just doesn't want to run correctly.

trying to run this script
It applies registry values based on ($apps)
Error = Missing Expression after unary operator '_'  On several lines
Please assist
$app = get-childitem c:\dome\$computername
$computername = (get-wmiobject -class win32_computersystem)._server
New-Item -path hklm:\Software\Management\Server -name Packages
Switch (&app)
"01" { set-itemproperty -path hklm:\Software\Management\DC\Server\Packages -name 01 -value 0173 }
"03" { set-itemproperty -path hklm:\Software\Management\DNS\Server\Packages -name 03 -value 1797 }
"04" { set-itemproperty -path hklm:Software\Management\WINS\Server\Packages -name 03 -value 1979 }

Hi Newbie_5107,
In addition, try to paste the script below and run in powershell, then check whether there still has any error:
$computername = (Get-WmiObject -class win32_computersystem).Name
$app = Get-ChildItem c:\dome\$computername
New-Item -path hklm:\Software\Management\Server -name Packages
Switch ($app.BaseName)
"01" { Set-ItemProperty -path hklm:\Software\Management\DC\Server\Packages -name 01 -value 0173 }
"03" { Set-ItemProperty -path hklm:\Software\Management\DNS\Server\Packages -name 03 -value 1797 }
"04" { Set-ItemProperty -path hklm:\Software\Management\WINS\Server\Packages -name 03 -value 1979 }
I hope this helps.

Similar Messages

  • Ipod 20 Gb click wheel just doesn't want to turn on

    I received my ipod one year ago and till last week I have never had any problems with it.Since last week it just doesn't want to turn on.I have done every step that it is said on the site that i should do in this situation and my ipod still doesn't turn on.When i try to restart it,it shows me the apple icon but it does not go any further.I can't get into my menu not even after I placed it on the Disk mode.I can hear it trying to open but never succeds.What am I supposed to do?And even if I should get it to a Service I don't even know where I could do that in Romania.
    I would appreciate any kind of help.
    Windows   Windows XP Pro  

    Have you seen if these articles help?
    iPod won't turn on
    iPod stops responding or won't wake from sleep
    -Kylene

  • My iMac keeps waking up or it just doesn't want to sleep.

    My 2009 iMac wakes up spontaneously or doesn't want to sleep. I have made sure no keys were pressed, no programs running, and the system doesn't wake from network activity. Is there a way to fix it? It all started as soon as I installed Yosemite.
    Thanks!

    I had a problem similar to this and the problem was my mouse (what kind of mouse is on the Mac?) - it was so sensitive that very minor vibrations (like a door closing or a big truck driving by) would cause it to wake up the computer when I had put it to sleep. I simply power down my mouse after putting my Mac to sleep and the problem went away. Turn on the mouse and move it a bit and the system would wake up when I wanted it to, not randomly any longer...
    Another possible issue is waking up from network accesses - this is in the "Energy Saver" System Preferences pane (in the Power Adapter tab) - do you have other computers or devices that might be trying to access the iMac while it was asleep?
    Good luck...

  • Why rmiregistry doesn't want to run?

    Hello
    I work on linux and I tried to run rmiregistry but without success.
    All I get is: Registry failed
    What can be reason of this message?. I run it once and it blocked my console then I turned off the console. From this moment I get this message. Restart should help but I'd like to know why this happens.
    Cheers
    Message was edited by:
    macmacmac

    Is that really the message? Sun's RMI Registry doesn't print this message.
    Maybe you unwittingly have the GNU java installed as well, in which case I recommend you just delete it.

  • Bluetooth just doesn't want to work

    I have a new mac pro that I am trying to sync with my mac book pro. For some reason, neither computer seems to find any other bluetooth capable machines. Both have the bluetooth on and are discoverable. Anybody know what's going on? I also have a lot of contacts on my LG V phone which I would love to get on the new computers. My phone seems to recognize my computer but then it doesn't seem to want to sync anything. Anybody have ideas for me? Thanks.

    Ok, i`ve installed blueman and everything works...

  • Gmail doesn't work and I tried everything there is on these forums, it just doesn't want to work for me

    gmail won't work in Firefox for me and I literally went to every forum an threat I could find and followed all of these instructions but I just can't get the damn thing to work, i even installed the Gmail panel app but I just won't work, it gives me the standard message that I need to enable my cookies, privacy, ... etc and I did all of that and all of the the other stuff (clear cache & cookies, change to 'no proxy', made a new profile, changed the file manually in the folder, etc.) and it just won't work and it's driving me insane. This made me change to chrome last year but that takes too much memory and I just love firefox. pls don't tell me I need to keep chrome installed just to read my mails there because this is ridiculous. pls help

    I would advice you not to follow the above advice as that will cause you to delete the Firefox profile folder and you lose all your personal data (bookmarks and other data).
    You can try these steps in case of issues with web pages:
    You can reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and remove cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • MusicSync just doesn't want to work

    Blackberry Bold
    Desktop Manager 4.6
    Windows Vista
    Hi everyone: Please this is getting real annoying: I have tried both from within the DM to open MusicSync and outside
    the DM and each time I even try to install it it says "MusicSync has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available" . deleted the progream and downloaded it again about 4 times now. Can anyone help?
    Thanks! 

    what is musicsync?
    I know of Media Sync and of Media Manager, but not Music Sync.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • FaceTime just doesn't want to work.

    Hi,
    I'm really struggling with my iPhone 4S and FaceTime so hoping someone will have some logical guidance for me!
    So, UK customer, on Three, but know FaceTime needs wifi - fine.
    Trying to call my sis, also iPhone 4 user. On her home wifi, also a Three customer.
    Not working.
    We have both tried reading through help material online and getting know where fast....
    Tried resetting, turning messaging off and on - most normal routes to try to get the darn thing going - but nothing.  It comes up with an error message saying "Not available for FaceTime"..... thoughts anyone?!
    Thanks.

    Hi rizkallah,
    Do we need to turn the cell network off and just leave the wifi on?!
    We've signed out and in and back and fourth..... still can't get it working! GRRRRR

  • JPanel with Image just doesn't want to show

    Hello,
    i am trying to create a JPanel with a JLabel to which i assign an ImageIcon, but for some reason the JPanel seems not to appear in my JFrame.
    Here's the code: private void jbInit() throws Exception
        NumberListener numListener = new NumberListener();
        frame = new JFrame();
        frame.setTitle("Error Manager");
        frame.setLayout(new GridBagLayout());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        gbc.gridwidth = 1;
        gbc.gridheight = 1;
        gbc.weightx = 1;
        gbc.weighty = 1;
        gbc.gridx = 0;
        gbc.gridy = 0;
        numberList = new JList(numbers);
        numberList.addListSelectionListener(numListener);
        numberList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        JScrollPane listScroller = new JScrollPane(numberList);
        listScroller.setPreferredSize(new Dimension(250, 80));
        frame.getContentPane().add(listScroller, gbc);
        imgPanel = new JPanel();
        imgPanel.setSize(300, 250);
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        Image img = toolkit.createImage("Somepic.png");
        imgPanel.add(new JLabel(new ImageIcon(img)));
        gbc.gridx = 1;
        gbc.gridy = 0;
        frame.getContentPane().add(imgPanel, gbc);
        frame.pack();
        frame.setVisible(true);
      }

    Sorry forgot to close the code tags...
    private void jbInit() throws Exception
        NumberListener numListener = new NumberListener();
        frame = new JFrame();
        frame.setTitle("Error Manager");
        frame.setLayout(new GridBagLayout());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        gbc.gridwidth = 1;
        gbc.gridheight = 1;
        gbc.weightx = 1;
        gbc.weighty = 1;
        gbc.gridx = 0;
        gbc.gridy = 0;
        numberList = new JList(numbers);
        numberList.addListSelectionListener(numListener);
        numberList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        JScrollPane listScroller = new JScrollPane(numberList);
        listScroller.setPreferredSize(new Dimension(250, 80));
        frame.getContentPane().add(listScroller, gbc);
        imgPanel = new JPanel();
        imgPanel.setSize(300, 250);
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        Image img = toolkit.createImage("1_Alpinweiss_III.png");
        imgPanel.add(new JLabel(new ImageIcon(img)));
        gbc.gridx = 1;
        gbc.gridy = 0;
        frame.getContentPane().add(imgPanel, gbc);
        frame.pack();
        frame.setVisible(true);
      }

  • My Iphone doesn't want to charge, please help?

    I have 3g Iphone, and I had a bit battery problem last few days, but now it just doesn't want to charge. Can you please help me, to repair it?

    Reboot your computer and the iPhone for starters.
    If you're on a Windows PC, connect the iPhone and open your Device Manager. To do that, click your Start Menu and do a search for Device Manager. Or if you're on Windows 8, open the Charms Menu on the right side and do the search from there. Once in the Device Manager, go down to Portable Devices and click the small arrow to open the sub-menu. One should say Apple iPhone. Right click on that and try to Update Driver Software. If that doesn't work, you can uninstall the driver, unplug the phone, then plug it back in to get it to reinstall the driver. That might take care of it.
    Are you able to get a hold of a different Lightning cable just to be sure it's not your cable? I've seen instances where these cables get bent or twisted, especially at the Lightning connector end, and the wire inside the sheathing breaks even though the outside looks fine.

  • Windows not recognizing my time capsle - I just purchased a new computer that runs windows 8 and it doesn't want to recognize the time capsule as an external hard drive (ie doesn't show up under my compter).  I've downloaded airport utility...

    I just purchased a new computer that runs windows 8 and it doesn't want to recognize the time capsule as an external hard drive (ie doesn't show up under my compter).  I've downloaded and run airport utility, but it seems to have a hard time finding the time capsule...maybe one out of 10 times it will find it.
    What's more, when I look under network infrastructure under the control panel, it shows my Broadcom ADSL centurylink Router...so I'm wondering if my modem/router combo is overriding the router function on my timecapsule and the time capsule is not being used as a router...
    Any help much appreciated!

    In this case the TC should be in bridge mode.
    Win8 is still problematic. Try using ethernet instead of wireless. I think the drivers are poor still and it is well worth having a try via ethernet if you haven't already.
    Otherwise you will need to wait for apple to release bonjour for windows 8 and airport utility.. which is not out yet.
    Also make sure the windows is set to home, not work or public.. even turn off the firewall.
    Open windows explorer and type the TC ip address into the address bar.. (none of which is perhaps the same.. I gave away windows at vista.. shudder)
    \\TCIPadderss.

  • Run script just before powerdown after hibernate using pm-hibernate

    Hi!
    I want to run the apcupsd killpower command just before the CPU powers down after successful hibernate. What it will do, is kill power from the UPS, so that it does not keep the UPS on battery power even after the PC has been shut down. Is there a way to run it during hibernate? Also, it should be the LAST thing to be run before the powerdown event, cause it will instantly kill power from the UPS. Any ideas are welcome. Let me know if i'm not clear enough.
    Thanks!

    kalpik wrote:But if i run the command using 99, would that be the absolute final thing before the CPU shuts down?
    No I think there's further stuff going on afterwards. At a minimum, pm-tools receives the exit code from that script and logs it. I think that then it tells the kernel actually to suspend.
    If your UPS is your sole source of power, and there's no battery in the machine, then I don't think you can do what you want with a script in /etc/pm/sleep.d.

  • My iphone doesn't want to finish syncing in my laptop it just says step 6 of 6 waiting for changes to be applied

    My iPhone 5 doesn't want to finish syncing in itunes it just keep saying step 6 of 6 waiting for changes to be applied and I have tried like thousand times...

    The warranty entitles you to complimentary phone support for the first 90 days of ownership.
    If you bought the product in the U.S. directly from Apple (not from a reseller), you have 14 days from the date of delivery in which to exchange or return it for a refund. In other countries, the return policy may be different. If you bought from a reseller, its return policy applies.

  • How can I check my passcode I updated today and when I am going to reset all content and setting my iPhone 4S they asked me for passcode when I entered the passcode the one I just update too is doesn't want to accept it

    how can I check my passcode I updated today and when I am going to reset all content and setting my iPhone 4S they asked me for passcode when I entered the passcode the one I just update too is doesn't want to accept it

    I have had the same problem with iPad recently not too sure why it happened but if you are completing a full reset anyway the easiest way is the restore via itunes on your computer and then set up a new passcode again. Resetting via itunes doesnt require a passcode so it should go straight through.
    Hope this helps

  • Hi I'm running Addressbook and cannot clear previous entry easily when searching my data base of around 5,000 contacts.    I prefer to view in All contacts on a double page spread with details on the right page.  Searching doesn't seem to work correctly i

    Hi I'm running Addressbook and cannot clear previous entry easily when searching my data base of around 5,000 contacts. 
    I prefer to view in All contacts on a double page spread with details on the right page.  Searching doesn't seem to work correctly in this view.
    It's always the second search that is problematic.
    I've tried typing over and all it seems to do is confine the search to the the entries that have come up for the previous search.
    I've tried to use the x to clear the previous entry and then type the next search, same problem.  The only way seems to be to move from "All Contacts" to "Groups".  Then the searched name appears and I can return to All Contacts to see full details.
    Surely three key press' are not the way it's supposed to work?
    FYI
    Processor  2.7 GHz Intel Core i7
    Memory  8 GB 1333 MHz DDR3
    Graphics  Intel HD Graphics 3000 512 MB
    Software  Mac OS X Lion 10.7.3 (11D50d)
    Address book Version 6.1 (1083)
    MacBook Pro, Mac OS X (10.7.1), 8Mb RAM 2.7Ghz i7

    AddressBook experts are here:
    https://discussions.apple.com/community/mac_os/mac_os_x_v10.7_lion#/?tagSet=1386

Maybe you are looking for

  • Usings a gamepad on XP

    Hello I'm currently running XP on an iMac 2.16GHz thru boot camp but every time I boot up and try to connect my gamepad the pc asks for pci device drivers, which i don't seem to have. Which ones do I need?

  • Excel Report out of Project Server 2010

    I am using the Business Intelligence Report to create a Pivot table report for timesheets. Although the resources have reported time and the timesheets have been approved. When I try and create the period report it stops pulling data after May 2014,

  • Mac Mini 2011 Black screen

    I have a mid 2011 mac mini (Intel HD 3000 graphics) with 8 Gb RAM running Yosemite (10.10). It's connected to a LG 42 inch monitor. Randomly, the screen blacks out for 2-3 seconds and then returns. I have: Reset the PRAM Removed one of the memory SIM

  • How to have texts sent to email

    How do I have undelivered texts sent to email ? I don't have cell service at home, don't receive texts.

  • Bpelx:remove gives runtime error

    Hi, I want to remove an element from an xml variavble. According to documentation I use the following syntax: <assign name="VerwijderBSN"> <bpelx:remove> <bpelx:target variable="inputVariable" part="payload" query="/client:SBVaststellenPersoonssetPro