Using Powershell to set Multiple timed.servers with variables

Having an issue using PowerShell to set 3 timed.servers which are defined in a variable. Running the commands: $TimeServers = "IPaddress1,IPaddress2,IPaddress3"Set-NaOption -OptionName timed.servers -OptionValue $TimeServers Thanks in advance!

Hi, The Set-NaOption CmdLet -optionvalue parameter expects a string and it shouldn't matter if that's a comma delimited string containing multiple IP Addresses. I noticed that whilst the cmdlet thows an error it does actually set the option value for all servers so this seems like it could be a bug (IMO). It might be possible to invoke the API using "Invoke-NaSystemApi" but I checked the ZAPI and noticed this also fails using ZExplore from the SDK: ZAPI Request: <?xml version="1.0" encoding="UTF-8"?>
<netapp  xmlns="http://www.netapp.com/filer/admin" version="1.21">
  <options-set>
    <name>timed.servers</name>
    <value>192.168.100.10,192.168.100.11,192.168.100.12</value>
  </options-set>
</netapp> ZAPI Results: <?xml version='1.0' encoding='UTF-8' ?>
<netapp version='1.1' xmlns='http://www.netapp.com/filer/admin'>
    <!-- Output of options-set [Execution Time: 8610 ms] -->
    <results reason='Unable to set option: timed.servers' errno='13001' status='failed'>
        <cluster-constraint>same_preferred</cluster-constraint>
        <cluster_constraint>same_preferred</cluster_constraint>
        <message>1 entry was deleted.
</message>
    </results>
</netapp> So i think the options are either using the "Set-NaOption" cmdlet with the -SilentlyContinue parameter or the "Invoke-NaSsh" cmdlet with -ErrorAction stop.As a work around i'd recommend something like: [String]$servers = "192.168.100.10,192.168.100.11,192.168.100.12"
[String]$command = "options timed.servers $servers"
Try{
   Invoke-NaSsh -Command $command -ErrorAction Stop
   Write-Host "Executed Command: $command"   
}Catch{
   Write-Warning -Message $("Failed Executing Command: $command. Error " + $_.Exception.Message)
} Hope that helps /matt

Similar Messages

  • Multiple report servers - with different uifont.ali

    Can we have multiple report servers with different NLS_LANG?
    They all should be started as windows service. Also I would like to have them look at different uifont.ali. The reason is that we want to have the same report run with different fonts in different languages. This way I can map the fonts in uifont.ali as I want.
    Is it possible?

    I don't think this is possible with multiple reports servers with one Oracle 9iAS home. You will have to install multiple 9iAS, in different Oracle homes.
    This also means that you have different URL's (port numbers) for the two environments.
    I have used this configuration before to install a test and production environment on one web server. Changing the conf files, variables etc. in the test environment doesn't influence the production environment that way.

  • Using powershell to manage multiple azure tenants

    Hi,
    I use powershell to access a company azure tenant.
    i need to connect to other Azure tenants but when i import the "publishsettings" file and try and run a 'get' command i am still connected to the first company tenant.
    Is there a way to connect to multiple tenants or a way of disconnecting from the first to allow the connection to next.
    Thanks

    sorry,
    see below example of powershell script
    Set-ExecutionPolicy Unrestricted
    Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1'
    Import-AzurePublishSettingsFile 'C:\ps\credentials.publishsettings'
    Get-AzureVM 
    this returns all the VMs in the Azure tenant, then if i try connect to another with 
    Set-ExecutionPolicy Unrestricted
    Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1'
    Import-AzurePublishSettingsFile 'C:\ps\credentials2.publishsettings'
    Get-AzureVM 
    this returns all the VMs from the first tenant i connected

  • SMSY_SETUP  Expert Setting Multiple SLD Servers

    Hi
    In SMSY_SETUP there is the Expert Setting : Multiple SLD Server which you mark with an X if you want to read from many SLD servers.  Can anyone help with how/where to configure which SLD servers to read from?  Does it read from SLDAPICUST and if so, is it possible to schedule this read from multiple servers automatically?
    Any help appreciated with points.
    Thanks
    Leigh

    Hi there..
    In the transaction LCRSERVADDR
    You can add another SLD ...remember to maintenance the user/pwd for the new sld in SMSY_SETUP Menu: Goto-->SLD User Maintenance
    Good luck..
    Wence
    http://www.linkedin.com/in/solutionmanager
    pd: Tomorrow I upload a SLD Document releated...in http://www.scribd.com/groups/view/10936-sap-solution-manager

  • How to use Powershell to set delegate for user mailbox in Exchange 2010 and Office 365

    Hello,
    Can you please tell me if I can set delegate for user mailbox in Exchange 2010 or Office 365 using Powershell?
    If I can, then how can I do that? (which Powershell commands for setting the delegate?)
    Many thanks, and have a good day!

    Hi,
    If you wanted to add a delegate to possiblly a large number of users or you do this during mailbox provisioning. So the following script will use
    impersonation to access another users mailbox and add a delegate.
    $mbtoDelegate = "[email protected]"
    $delegatetoAdd = "[email protected]"
    $dllpath = "C:\Program Files\Microsoft\Exchange\Web Services\1.0\Microsoft.Exchange.WebServices.dll"
    [void][Reflection.Assembly]::LoadFile($dllpath)
    $service = new-object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2007_SP1)
    $windowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
    $sidbind = "LDAP://<SID=" + $windowsIdentity.user.Value.ToString() + ">"
    $aceuser = [ADSI]$sidbind
    $service.AutodiscoverUrl($aceuser.mail.ToString())
    $service.ImpersonatedUserId = new-object Microsoft.Exchange.WebServices.Data.ImpersonatedUserId([Microsoft.Exchange.WebServices.Data.ConnectingIdType]::SmtpAddress,
    $mbtoDelegate);
    $mbMailbox = new-object Microsoft.Exchange.WebServices.Data.Mailbox($mbtoDelegate)
    $dgUser = new-object Microsoft.Exchange.WebServices.Data.DelegateUser($delegatetoAdd)
    $dgUser.ViewPrivateItems = $false
    $dgUser.ReceiveCopiesOfMeetingMessages = $false
    $dgUser.Permissions.CalendarFolderPermissionLevel = [Microsoft.Exchange.WebServices.Data.DelegateFolderPermissionLevel]::Editor
    $dgUser.Permissions.InboxFolderPermissionLevel = [Microsoft.Exchange.WebServices.Data.DelegateFolderPermissionLevel]::Reviewer
    $dgArray = new-object Microsoft.Exchange.WebServices.Data.DelegateUser[] 1
    $dgArray[0] = $dgUser
    $service.AddDelegates($mbMailbox, [Microsoft.Exchange.WebServices.Data.MeetingRequestsDeliveryScope]::DelegatesAndMe, $dgArray);
    Hope this helps.

  • Setting Button icon source with variable at runtime ?

    I have an application that requires me to use a relative path
    for my flex buttons. The problem I'm having is trying to set the
    relative path with a variable that gets passed in at runtime. Is
    this possible ? I will not always know where the application is
    being run from so I need to pass in the current directory (from a
    .net application by the way, which works great.) and use that as
    the relative source for the button icons.
    Make any sense ?
    Thanks in advance for any help !

    Impossible AFAIK.
    Extend mx.controls.Button and create your own
    RuntimeIconButton component ;)

  • Unable to set NTFS permissions on share using PowerShell. The user shows up with no rights checked off.

    I am having a little problem here with setting NTFS permissions via PowerShell. 
    Basically I am able to make a new directory on the share, and assign a user NTFS permissions however it just assigns the select user without any permissions set.
    $username = "test.user"
    $directory = "\\testlab-sv01\Share\newfolder"
    New-Item -Path $directory -ItemType Directory
    $colRights = [System.Security.AccessControl.FileSystemRights]"FullControl"
    $InheritanceFlag = [System.Security.AccessControl.InheritanceFlags]::ContainerInherit
    $PropagationFlag = [System.Security.AccessControl.PropagationFlags]::InheritOnly
    $objType =[System.Security.AccessControl.AccessControlType]::Allow
    $objUser = New-Object System.Security.Principal.NTAccount("$username")
    $objACE = New-Object System.Security.AccessControl.FileSystemAccessRule($objUser, $colRights, $InheritanceFlag, $PropagationFlag, $objType)
    $objACL = Get-ACL $directory
    $objACL.AddAccessRule($objACE)
    Set-ACL $directory $objACL
    A side question, why isn't this native in Powershell? Is it for security reasons? I expected there to be a cmdlet for it. 
    Thanks. 
    Kyle

    When you say there are no permissions, do mean that the ACL Editor is showing 'Special permissions' and none of the other boxes are checked?
    Try changing the inheritance and propagation flags to this:
    $InheritanceFlag = [System.Security.AccessControl.InheritanceFlags] "ContainerInherit, ObjectInherit"
    $PropagationFlag = [System.Security.AccessControl.PropagationFlags]::None
    That sets the ACE to apply to the folder (InheritOnly propagation flag isn't set) , subfolders (ContainerInherit inheritance flag is set), and files (ObjectInherit inheritance flag is set), which is necessary for the ACE to not be considered 'special' in
    the ACL Editor.
    Awesome. Thanks. That did work. 
    And yes I did mean that it was showing special permissions with nothing checked. 
    Kyle

  • Using PowerShell to set Custom Access Rights on a Calendar Does not set Free/Busy Permissions

    We recently discovered an issue where, if you use Exchange Management Shell to configure custom access rights, the Free/Busy permissions do not get set at all (they remain as "None"):
    $temp = [Microsoft.Exchange.Management.StoreTasks.MailboxFolderAccessRight[]]("ReadItems","EditOwnedItems","DeleteOwnedItems","EditAllItems","DeleteAllItems","FolderVisible")
    Add-MailboxFolderPermission -Identity "conf-company-test:\calendar" -User "Company Calendar Management" -AccessRights $temp
    Add-MailboxFolderPermission -Identity "conf-company-test:\calendar" -User "mpinkston" -AccessRights Editor
    If you use a pre-defined "role" such as Editor given to mpinkston6 in the above example it sets the Free/Busy permission to Full Details. It would appear that using Add-MailboxFolderPermission or Set-MailboxFolderPermission is generic for folder
    objects, and doesn't explicitly set the Free/Busy permissions. In the case of the pre-defined roles either the command is doing something special/different, or the permission checks later accept pre-defined roles for determining Free/Busy permissions. No idea
    which is going on. If Free/Busy permissions can be fixed through PowerShell by some other mechanism/command, that would be great. If not, how do we go about requesting a fix/feature change in Exchange?
    http://technet.microsoft.com/en-us/library/dd298062%28v=exchg.150%29.aspx
    (Please expand Parameters and read AccessRights to get a better understanding for what I'm describing.)

    Did you try adding AvailabilityOnly or LimitedDetails in your $temp variable for Calendar folder? These would set it to "Free/Busy time, subject, location" or "Free/Busy time" respectively....
    Add-MailboxFolderPermission - http://technet.microsoft.com/en-us/library/dd298062(v=exchg.150).aspx
    The following roles apply specifically to calendar folders:
    AvailabilityOnly   View only availability data
    LimitedDetails   View availability data with subject and location
    Amit Tank | Exchange - MVP | Blog:
    exchangeshare.wordpress.com 

  • Multiple HTTP Servers with Portal

    I am trying to set up 9iAS (Portal) on a server that already has several HTTP servers on it. The System Administrator wants a "web services" on a single NT box. I installed 9iAS and that seemed to complete OK but now I'm getting some errors trying to use Portal...I can't get logged in to Portal30/Portal30.
    Is it possible to run several Apache servers including Portal on a single NT box?
    We are moving up to Portal 3.0 from WebDB 2.2 which is on a NT box by itself.

    it is possible, just install 9ias in multiple oracle_homes, if u need 2 instances of HTTP server, install in 2 Oracle homes and each could point to same Login Server. Metalink has a good note on this.

  • Multiple Infrastructure servers with Single OID/SSO Server

    I am trying to migrate an application from OAS/8.1.6 to 9iAS. We have multiple OAS instances clustered using Microsoft NLB and the remote database is also on a Microsoft cluster. We intend to use Single Sign On for authentication of clients (application is in remote 9i Database accessed via a PLSQL DAD)
    Have successfully implemented this on a single machine - installed 9iAS Infrastructure and now web clients can go to url http://server.com/myapp and are redirected to the single sign on pages before running the /myapp application via the PLSQL DAD.
    However, I am having problems trying to scale this via installing further infrastructure instances which utilise the first OID/SSO server above. This appears to be a supported configuration and during install I am prompted for the location of the OID/SSO server - the first server is located correctly and installation works fine.
    However, mod_osso doesn't seem to be configured when the subsequent servers are installed. I've followed the procedures described in the Oracle Note 217155.1 "HOW TO avoid the redirection to the SSO-Server" to configure the new servers as partner applications to the original server. A PLSQL Dad has also been configured on these servers and tested without mod_osso in the way.
    Accessing the /myapp application via any of the new servers results in redirection to single sign on pages with the text "Error: Invalid value specified. (WWC-41409)" being displayed on the login page so there's obviously a configuration error.
    Has anybody else been through the exercise of creating a distributed enterprise level infrastructure installation of 9iAS and would be willing to share any lessons learnt? Or does anyone know how to solve the WWC-41409 error?

    If you haven't finished configuring your server configuration already you might want to do a search on Metalink using the key word "ptlasst.bat". You can create and wire multiple repositories using this utility.

  • Multiple Modbus Servers with Different Unit ID running in cRIO 9074. Possible ?

    Hello
    I want to create an application such that i can create two Modbus I/O slave server (TCP/IP) with different unit ID and can communicate with the slave through Clients. I created this application but only unit ID 1 is working. Is it like this that at a time two modbus slaves cannot work together ? Also I tried with one server and giving different Unit ID but then also it's not working. I found one thread, here is the link.
    http://208.74.204.114/t5/LabVIEW/how-do-i-get-multiple-tcp-ip-modbus-to-work-together/td-p/2239130 
    Are there any updates on this issue.
    Labview 2012 sp1
    cRIO 9074

    I don't fully understand your issue (but I'm trying).
    Traditionally Modbus TCP/IP slaves cannot talk to each other, also the UnitID is mostly moot for MODbus/TCP since ports and IP addresses exist (unless you are building custom applications that will handle UnitID internally, because you have can't have 2 servers running on the same port).
    If you can clarify your first sentence that would help a lot.
    Varun_ECK wrote:
    Hello
    I want to create an application such that i can create two Modbus I/O slave server (TCP/IP) with different unit ID and can communicate with the slave through Clients.
    You want to create 2 MODbus/TCP slave servers, that can talk to other slaves? Or do you want the Master to automatically do things based on the slaves response? Are the TCP slaves on different computers, IP, etc?

  • Fail to change "AddressState" using powershell cmdlet "Set-NetIPAddress"

    PS C:\Users\webadm> Get-NetAdapter | Get-NetIPAddress IPAddress : 10.145.0.118 InterfaceIndex : 12 InterfaceAlias : Ethernet AddressFamily : IPv4 Type : Unicast PrefixLength : 24 PrefixOrigin : Manual SuffixOrigin : Manual AddressState : Deprecated ValidLifetime
    : Infinite ([TimeSpan]::MaxValue) PreferredLifetime : 00:00:00 SkipAsSource : False PolicyStore : ActiveStore PS
    C:\Users\webadm> Get-NetAdapter | set-NetIPAddress -IPAddress 10.145.0.118 -AddressFamily IPv4 -AddressState Preferred set-NetIPAddress : No matching MSFT_NetIPAddress objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_NetIPAddress
    class on the CIM server: SELECT * FROM MSFT_NetIPAddress WHERE ((IPAddress LIKE '10.145.0.118')) AND ((InterfaceIndex = 12)) AND ((InterfaceAlias LIKE 'Ethernet')) AND ((AddressFamily = 2)) AND ((AddressState = 4)). Verify query parameters and retry. At line:1
    char:18 + Get-NetAdapter | set-NetIPAddress -IPAddress 10.145.0.118 -AddressFamily IPv4 -A ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (MSFT_NetIPAddress:String) [Set-NetIPAddress],
    CimJobException + FullyQualifiedErrorId : CmdletizationQuery_NotFound,Set-NetIPAddress
    Can anyone tell what's going wrong? thanks.

    Hello !
    To add an IP address, you have to use New-NetIPAddress cmdlet.
    Example:
    New-NetIPAddress -InterfaceIndex 12 -IPv4Address 10.145.0.118 -PrefixLength 24
    If you have to remove the
    10.145.0.118 address, you can use Remove-NetIPAddress.
    Hope this helps.
    Note: This posting is provided 'AS IS' with no warranties or guarantees, and confers no rights. Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable. This helps the community, keeps the forums tidy, and
    recognises useful contributions.

  • Using ssis import a multiple flat files with different mappings

    I have an scenario for import a file
    20 different flat file source and having XML mapping document in a table.
    get files from that path(i have path and file name extension in table)
    i have map this file based on the file name extension in dynamically
    create a 20 different staging table based on mapping in dynamically
    kindly help for this
     

    Hi Karthick,
    As Arthur said, if you don't want to hard code the data flow, you need to read XML from the SQL Server table and use Script Task to implement the dynamic columns mapping. To read XML from a SQL table, you can refer to:
    http://blog.sqlauthority.com/2009/02/13/sql-server-simple-example-of-reading-xml-file-using-t-sql/ 
    In the Script Task, we need to parse the first row of the flat file to get the columns information and save that to a .NET variable. Then, the variable will be used to create the query that will be used to create SQL table. For more information, please see:
    http://www.citagus.com/citagus/blog/importing-from-flat-file-with-dynamic-columns/ 
    Regards,
    Mike Yin
    TechNet Community Support

  • Is it possible to set multiple textfield value with a for=loop

    JTextField W1HourTF=new JTextField(8);
    JTextField W2HourTF=new JTextField(8);
    JTextField W3HourTF=new JTextField(8);
    JTextField W4HourTF=new JTextField(8);
    I have created the above 4 textfields, I want to set all the text field editable using a for loop.
    Is there any method which can do it? Example :
    for (i=0,i<=4,i++)
    WHourTF.setEditable(true); // where i is based on the loop time

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.border.*;
    class JTEXTFIELD extends JFrame
         JTextField [] jTextFieldArray = {jTextField1, jTextField1, jTextField2, jTextField3};
    ========================================================================
    How come I get error :
    JTEXTFIELD.java:9: cannot resolve symbol
    symbol : variable jTextField1
    location: class JTEXTFIELD
    JTextField [] jTextFieldArray = {jTextField1, jTextField1, jTextField2,
    jTextField3};

  • Problems multiple SMTP servers with a single name at my work

    At my University we have our outgoing mail sent to smtp.su.se
    The IT department has three separate servers that handle the outgoing mail. If one server goes down a PC user get his mail out using one of the two other good servers. In the last month us Mac users have a serious problem, where our computers "remember" the which of the three servers we last used even though they all have the same name smtp.su.se. I had the #2 server go down and could not send mails out. The IT department is blaming a fault in the Mac system software. The IT department told me to pick one of the servers that was still up and running smtp3.su.se and my mails did send. But now I depend on just that one server. Is my IT department correct in saying that my Mac system 10.5 is remembering in the background which specific machine was last used and bypassing the shared server function. My guess is that the IT department has something messed up but it is beyond my abilities to tell. Help please....

    Hello aps7828:
    If I read that correct, you only get the error when you run the executables and not the VIs. Can you take a look at your processor level while one .exe is running. I am wondering if that is the source of the problem.
    Regards,
    Roland A.
    Applications Engineer
    National Instruments
    Check out VI Roadshow

Maybe you are looking for

  • Upgrading to uber SDO_GEOMETRY, looking for comments

    Good morning folks, I see the new thread from Dalibor discussing an issue with what I am calling "uber" SDO_GEOMETRY - anyone got a better name? Uber SDO_GEOMETRY is described here http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11830/sdo_mi

  • Problem accessing gmail with IMAP using JavaMail APIs

    Hi, I am trying to access my gmail account with JavaMail API. I am able to access it using pop3s but not with IMAP. I have used following details: protocol: imap host: imap.gmail.com port: -1 (also tried with 993) but no success. My basic code is url

  • What can I do, if a DVD will not play?

    What can I do, if a DVD will not play?

  • Cost Error in ECP

    Hi Every body In ECP when we are planning a cost with the specic model, it is calculating the wrong price. The input values Material 1 Material 2 with specific vendor with the specic units. Thanks in Advance.

  • Which mac for photoshop CS6?

    which mac for photoshop CS6?