Set network time via script or terminal command

Hi
We are trying to set our computers to the network time at login.  We tried modifying the MCX time via workgroup manager but that did not work.  I have used my old script/command I used for 10.6 to set our 10.8 machines to the network server but it says command not found.  Been googling to find a command/script that works for 10.8 but so far unsuccessful finding a solution. 
This is the script/command I used:
# Set time zone and time server.
$systemsetup -setusingnetworktime on
$systemsetup -settimezone America/New_York -setnetworktimeserver time.apple.com
Any suggestions would be greatly appreciated!
Cheers

Why does having the System Preference in Date & Time set  to automatically set the date and time from the Apple servers not work for you?

Similar Messages

  • Apple TV is asking me to set network time. how to do this?

    Apple TV is asking to set network time. How is this done?

    Assuming this is not the first time you have used your Apple TV
    You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
    Also try restarting the router.
    If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
    If this is a new Apple TV, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123.

  • Apple TV. setting network time

    MMy school's wifi network demands that I log in before using, and Apple TV tries to set network time before I log in. How can I set network time after I log in to the network. I don't seem to see a menu item for this.

    Apple TV cannot set the network time + date

  • HT202157 setting network time and date

    What are the issues involved in setting the time and date on AppleTV?   Is this a network issue?

    P.C. was mentioned earlier so I will jump in and assume Windows....
    If the system is (made) a member of a Window administrative domain then all this is already in the box, and should be part of a well managed system (I have managed it on a workgroup as well, see the articles below for details). It's one of the things I try to promote as we often have systems switched on for hundreds / thousands of hours and knowing when some guy accidently switched it all off is realy usefull It helps with problems / events that occur outside our control and assists tracking down problems and stops drift / skewing of data.
    Check out the following articles for more information: -
      Basic Operation of the Windows Time Service
      http://support.microsoft.com/kb/q224799/
      Registry entries for the W32 TimeService
      http://support.microsoft.com/default.aspx?scid=kb;en-us;Q223184
      Windows 2000 cannot set the correct time when it connects to multiple NTP servers
      http://support.microsoft.com/?id=837196
    The time service is included on Windows XP as well. For NT4 there is / was a toolkit that allows operation from Microsoft.
    Use the command NET TIME /? (on W2K and XP)
    Either way you will come accross problems at the firewall if you want to get to an external time source. Unless you have on of those nifty little black boxes that pick up a radio signal from one of the available time sources.
    I like Dennis Knutsons idea because you can't always get IT's attention, sometimes they need a little help, thanks again Dennis for another good tip.

  • Unable to set network time and date

    My Applet TV2 is unable to set the network time and date making it so I cannot login to my itunes account so not Netflix or anything making it pointless. I have tried adjusting my router settings (although I've used the same router for over and year and this just started randomly) I have ensured Port's 123 are open, I've restored the ATV2 4 times and have reset my router. I've seen links showing how to use SSh to set the time but I'm unsure if that will work. Any help is appreciated as I'm at a loss at this point

    Welcome to the Apple Community.
    Of the things I've seen work for people in the community you seem to have done most of them, but did you try these.
    Restart Apple TV by removing ALL the cables for a moment or two.
    Ensure that the DNS address's used by the Apple TV and the router are the same and are the address recommended by your ISP.

  • Set OU Attribute via Script

    Is it possible to set the "ou" attribute of a computer object in AD via script?  That attribute is not listed as an option in Set-ADComputer and it doesn't auto-populate based on the OU the object is in.  How can I programatically set
    the attribute rather than modifying each individual object manually?

    You can populate it with Set-ADComputer.
    Set-ADcomputer -Identity xxx -add @{ou="yyy"}
    This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
    Get Active Directory User Last Logon
    Create an Active Directory test domain similar to the production one
    Management of test accounts in an Active Directory production domain - Part I
    Management of test accounts in an Active Directory production domain - Part II
    Management of test accounts in an Active Directory production domain - Part III
    Reset Active Directory user password

  • How to set network time

    How to set network time

    You can't set it manually, it requires access to the internet server in order to do so. It is currently having trouble connecting; make sure location is set correctly via settings, DNS should be set to automatic (settinga - general - network), ensure port 123 is open on your router. Router needs to be up to date, reboot ATV and router.

  • Set inactivity time via group policy or registry

    Hi,
    I have been asked to enable the "Show me as away when I've been inactive for X minutes" option within Skype's general settings for everybody in the company and also set the time option to 5 minutes.
    I so far can't find a Group Policy template that allows this however I was wondering if there was a simple registry setting that would enable this? That way I could just push out the registry setting company wide.
    Would anybody be able to point me in the right direction for this?
    Thanks
    David

    Hi,
    No, I think there is no change from old “Win32_TSPermissionsSetting”. You can use the same class for remote control.
    You may use WMI to change the listener's security descriptor.  For example, you may use the AddAccount method to add a group to the default RDP-Tcp listener and grant it Full Control (below is using wmic logged in locally):
    wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TSPermissionsSetting WHERE(TerminalName="RDP-Tcp") CALL AddAccount "DOMAIN\group",2
    After making a permission change you should log off any users that will be the target of a log off so that the change will take effect (quoted from
    this thread).
    Apart you can also try below policy setting.
    Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections 
    User Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections 
    Set rules for remote control of Remote Desktop Session Host server user sessions: Enable
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    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]

  • Can't set network time on SBS 2011 Server

    I'm trying to sync the time on an SBS 2011 server to an external source, as it keeps drifting by 2-5 minutes a week.   But I can't even run a NET START W32TIME without getting the error below - which I don't really understand.
    C:\>net start w32time
    System error 1290 has occurred.
    The service start failed since one or more services in the same process have an
    incompatible service SID type setting. A service with restricted service SID typ
    e can only coexist in the same process with other services with a restricted SID
     type. If the service SID type for this service was just configured, the hosting
     process must be restarted in order to start this service.
    I get the SAME error trying to start Windows Time manually in Services - it is not running.
    Anyone?    Thanks.
    Bill

    Hi Bill:
    Have you tried this?
    http://answers.microsoft.com/en-us/windows/forum/windows_vista-performance/windows-time-service-will-not-start/6bbea43f-5575-4e78-9b52-ac766632bfc2
    I know it says Telephone service in the answer, but it appears to have resolved the time sync problem.
    There is also a thread where simply changing the host the time service queries fixes it.
    Larry Struckmeyer[MVP] If your question is answered please mark the response as the answer so that others can benefit.

  • HT4367 still trying to set network time

    ok did restoring software didn't work. Any other ideas folks?

    As I knew I would, I am regretting buying another Apple product (should have leant my lesson with the iphone). Have an ATV2 and cannot set time and date. Spent hours and hours on it and completely fed up. So many people experiencing this issue in the forums as well.
    Fix anyone please? Close to thowing it in the same bin the iphone is in. How difficult can it be to roll out a product where ntp works?

  • Why is my apple tv unable to set network time?

    How do I get it to correct this? I have rebooted ATV and also my router (which I unplugged everything from the router). I recently had a long term power outage in my area. (5 days)

    wiremup wrote:
    Why is my apple tv asking to be connected to iTunes via a cable when I was updating software? It went through step 1 and then a picture of the iTunes logo and a cord came on screen. Help please
    Yikes the exact same thing just happened to me when updating my Apple TV just now.   It's totally bricked.    Did you find a fix?
    Dave

  • Bug: Setting "Don't include footnotes" via scripting doesn't change the find/change dialog

    Hi,
    Small bug, but can be confusing. Whether you write this line:
    app.findChangeTextOptions.includeFootnotes = false;
    or this line:
    app.findChangeTextOptions.includeFootnotes = true;
    ... you won't see any different in the little footnotes button in the
    find/replace dialog, even though the setting does work via scripting.
    More testing is needed to see what can be done to get the UI in sync
    with the setting...
    Ariel

    The dialog isn't updated while it's displayed. But hiding the dialog and displaying it again (twice Ctrl+F) shows that the script did do its thing.
    Peter

  • HT4367 APPLE TV3 Network Time missing

    Please, First time I've got my Apple TV and it's being working fine since March 2012 when iI bought it....until now cause like many of you when downloaded Software 5.1 now can not set Network Time, adjust, etc. How long last the warranty ??? thanks.

    Here's what finally worked for me with Apple TV 3rd generation. Out of the box, when setup with wi-fi, it breezed through without any issue. As soon as I powered down and connected it to another tv (same wi-fi network), it got stuck at setting date/time. The remote would help in getting out of it, but the home would only have "Computers" and "Settings" and pretty much useless except for AirPlay. Here's what I did to resolve this:
    1. On your main router, temporarily disable the firewall or set it to the lowest setting allowable (a reboot of the router maybe required).
    2. Restart apple tv via the "restart" option in the "General" option in the main settings menu.
    3. It should breeze through and not show the "Setting date/time" screen.
    4. Once it loads up properly, turn on your fire wall as before  (a reboot of the router maybe required).
    I think it worked for me out of the box, but auto-update to the latest software introduced this bug. So, everytime apple tv tries to synch with the time server, this issue will come back. To disable this, I turned off the "auto time synch" option in Settings -> General.
    I am fairly confident that I'd be able to use steps 1 through 4 anytime this recurs. Possible scenarios causing recurrence of this issue:
    1. Unplugging the power to apple tv or power failures.
    2. OS updates.
    3. Restoring apple tv using "Restore" or via micro-usb and iTunes to the lastest OS.
    Hope this helps. Please post if this works for you.

  • Detecting clientside NLS_LANG setting in SQL*Plus script

    Our company has developed an application that uses an Oracle database as it backend. Companies can buy our application and run it against their own Oracle installation.
    A new version of our application often requires an update to the Oracle database schema.
    Together with new application files we send our customers an update.sql script they must run against their database using SQL*Plus.
    This update script may contain international characters like é for example:
    UPDATE SHOPS SET DESCRIPTION = 'Café'
    WHERE SHOP_ID=1We save the SQL-script file in windows-1252 encoding so the character é is encoded as 0xE9 in the script file.
    When the DBA running the upgrade script has set NLS_LANG=.WE8MSWIN1252 this works perfectly.
    When the DBA has set his NLS_LANG=US7ASCII the é gets replaced by an upside-down question mark. Other NLS_LANG settings can also be troublesome.
    To prevent this we give very clear installation instructions. However, nobody reads them. This leads to two questions:
    A) Is there a way to prevent this problem so I do not depend on the NLS_LANG setting by the DBA running the upgrade script?
    B) Otherwise: is there a way to test for the NLS_LANG setting inside the script and abort if it is not WE8MSWIN1252?
    Info:
    Database is 10.2.0.3/10.2.0.4 and sometimes 10.2.0.5, always database character set WE8MSWIN1252.
    Client software: I do not know what each DBA uses but it will be mostly 10g client software
    Client OS: Some DBA's will be running the script from Windows, others from some Unix variety. I cannot control that.

    I agree with Sergiusz. You're much better off if you can remove character set dependencies from your scripts by using commands like this.
    UPDATE SHOPS SET DESCRIPTION =  unistr( 'Caf\00E9' )
    WHERE SHOP_ID=1 ;If that's not possible however you can try this approach to determine the session's character set.
    SQL> column USERENV_LANGUAGE format a30
    SQL> column oracle_charset   format a20
    SQL> r
      1  select
      2    userenv_language
      3  , substr
      4    ( userenv_language
      5    , instr( userenv_language, '.' ) + 1
      6    ) as oracle_charset
      7  from
      8  ( select sys_context( 'USERENV', 'LANGUAGE' ) as userenv_language
      9    from dual
    10* )
    USERENV_LANGUAGE               ORACLE_CHARSET
    AMERICAN_AMERICA.AL32UTF8      AL32UTF8 --
    Joe

  • Terminal Command(s) to Identify an App as 32-Bit, 64-Bit, or Universal.

    I am sure I am doing something wrong, but each time I see a terminal command to do what is indicated above, I try it, and it doesn't work for me.
    So, I would greatly appreciate someone definitely in to know helping me out with the command(s) mentioned in my subject.

    I believe the command you're looking for (or at least one that works) is "file";
    The example below indicates that Mail.app is capable of launching as a 64bit app;
    +[Shirow:~] shmoo% file /Applications/Mail.app/Contents/MacOS/Mail+
    +/Applications/Mail.app/Contents/MacOS/Mail: Mach-O universal binary with 2 architectures+
    +/Applications/Mail.app/Contents/MacOS/Mail (for architecture x86_64): Mach-O 64-bit executable x86_64+
    +/Applications/Mail.app/Contents/MacOS/Mail (for architecture i386): Mach-O executable i386+
    Below indicates that VLC installed on my mac is only a 32bit app;
    +[Shirow:~] shmoo% file /Applications/VLC.app/Contents/MacOS/VLC+
    +/Applications/VLC.app/Contents/MacOS/VLC: Mach-O executable i386+
    love,
    shmo

Maybe you are looking for