"Cluster Events" via powershell

I have been looking around and am not seeing what i need.
I am just wanting to get what is listed in the "Cluster Events" via powershell.

Hi,
You can sue the
Get-ClusterLog cmdlets to view the cluster log.
The related KB:
Get-ClusterLog
http://technet.microsoft.com/en-us/library/hh847315.aspx
More information:
Failover Clusters Cmdlets in Windows PowerShell
http://technet.microsoft.com/en-us/library/hh847239.aspx
Hope this helps.
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place.

Similar Messages

  • Hyper-v Failover Cluster management via powershell

    Hi
        We are looking at having a management server act as proxy for managing couple of hyper-v clusters using CSV. We plan to do management using powershell commands.
        We create a session one of the host in the cluster  and execute commands using invoke-command. The cluster verbs seems to fail with the following warning. 
    WARNING: If you are running Windows PowerShell remotely, note that some failover clustering cmdlets do not
    work remotely. When possible, run the cmdlet locally and specify a remote computer as the target. To run the
     cmdlet remotely, try using the Credential Security Service Provider (CredSSP). All additional errors or
    warnings from this cmdlet might be caused by running it remotely.
      What is the recommended way to do setup for using FailoverCluster ? We want to have a single management server that act proxy for all servers clustered or not.
      Also, is there a document that describe various operations done via Failover Cluster Manager and corresponding powershell commands (or set of commands).
    Thanks
    /Jd

    Regarding the Stop action from Failover Cluster Manager, Eric, I understand your point. But when I do shutdown from Failover Cluster Manager, the VM shuts down as expected even when the setting is set to Save.
    I was very specifically talking about the Stop-ClusterGroup cmdlet, not any command issued in Failover Cluster Manager. But, well, yeah, if you tell a VM to shut down, it shuts down. I don't know why you'd expect anything different to happen. If you're looking
    for the equivalent to Stop-ClusterGroup inside Failover Cluster Manager, it's not called "Shut Down". You can use "Stop Role" on the "More Actions" menu for the VM. You can also find the configuration object (usually named in the format of "Virtual Machine
    Configuration XXX") and take it offline.
    I tested a number of times after your first post, and Stop-ClusterGroup does what the Cluster-Controlled Action is set to every single time for me.
    I could only make educated guesses at the underlying mechanics of FCM and PowerShell's cluster cmdlets, but the stand-out difference is that FCM has no method to operate in a double-hop situation at all, while PowerShell does. You only encounter these difficulties
    with PowerShell in that second hop. The question you're asking: "it would be great to know how Failover Cluster Manager works without this setup ?" is an apples-to-oranges comparison.
    This particular sentence of yours sort of changes the overall parameter of your question:
    "... so our automation works..."
    I was under the impression you were setting up this double-hop because you wanted admins to manually execute PowerShell cmdlets against your cluster from a single controlled location.
    If automation is your goal, do it right from the cluster. I obviously don't know your entire wishlist and it's none of my business, but this double-hop situation may not be ideal.
    Eric Siron Altaro Hyper-V Blog
    I am an independent blog contributor, not an Altaro employee. I am solely responsible for the content of my posts.
    "Every relationship you have is in worse shape than you think."

  • Issues updating/setting multi value lookup columns via powershell

    Hi All,
         I have an issue updating multi values in a lookup field via powershell
    I can update a single value  lookup field as below but can't get to update if its multi value.
    As stated below when I hardcode it. It works.
    No idea what 'm missing. Any help will be appreciated.
    #Hardcoded works below as you can see i'm setting 3 values
    $array = @($realval.Split(';'))
    for ($i = 0; $i -lt $array.Count - 1; $i += 2)
    $word = $array[$i].Trim('#')
    $number = $array[$i+1].Trim('#')
    "$number $word"
    $lookupvalue1 = GetLookUpValues -val $number
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $itemValues = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    [Microsoft.SharePoint.SPFieldLookupValue] $lookupvalue = New-Object Microsoft.SharePoint.SPFieldLookupValue
    [Microsoft.SharePoint.SPFieldLookupValue] $lookupvalue2 = New-Object Microsoft.SharePoint.SPFieldLookupValue
    [Microsoft.SharePoint.SPFieldLookupValue] $lookupvalue3 = New-Object Microsoft.SharePoint.SPFieldLookupValue
    $lookupvalue.LookupId = 1
    $lookupvalue2.LookupId = 2
    $lookupvalue3.LookupId = 6
    $itemValues.Add($lookupvalue)
    $itemValues.Add($lookupvalue2)
    $itemValues.Add($lookupvalue3)
    #$itemValues.Add($lookupvalue)
    $CMRSItems["Event Type"] = $itemValues;
    Write-Host "items:" $itemValues
    $CMRSItems.Update()
    # This works when its updating only one value but when it needs to update multivalue it only updates the last one
    #so for example with the lookupvalue above only 6 gets updated below
    $array = @($realval.Split(';'))
    for ($i = 0; $i -lt $array.Count - 1; $i += 2)
    $word = $array[$i].Trim('#')
    $number = $array[$i+1].Trim('#')
    #$number
    "$number $word"
    #send param to GetLoolValues func to return records as SPFieldLookupValue
    $lookupvalue1 = GetLookUpValues -val $number
    #I can view the lookupvalue returned successfully
    #Write-Host $lookupvalue1
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $itemValues = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    #This LookupId returns 3 values like on the hardcoded one above like so :1,2,6
    $lookupvalue.LookupId = $number
    $itemValues.Add($lookupvalue)
    $CMRSItems["Event Type"] = $itemValues;
    #I can view the items returned successfully
    Write-Host "items:" $itemValues
    $CMRSItems.Update()

    The problem I can see with your code is that the below line of code, you are instantiating inside the for loop. This should have been outside the for loop as by keeping it inside the loop you are overriding the value.
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $itemValues = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    Please have a look at the below solution and modify your code as per your requirement. What I am trying to achieve in the below code is that I have a listA in which one of the field is being used as a multi-lookup in my listB.
    $lookupCollection = $something.split(";")
    $LookupMasterList=$web.Lists["ListA"]
    [Microsoft.SharePoint.SPFieldLookupValueCollection] $lookupValueCollection = New-Object Microsoft.SharePoint.SPFieldLookupValueCollection
    #Get the Lookup Item from Parent List
    foreach($item in $lookupCollection){
    IF([string]::IsNullOrEmpty($item.trim())) {
    continue;
    $LookupItem = $LookupMasterList.Items | Where-Object { $_.Item("FieldInternalName") -eq $item.trim()}
    if($LookupItem -ne $null)
    $myLookup = New-Object Microsoft.Sharepoint.SPFieldLookupValue($LookupItem.ID,$item.trim())
    $lookupValueCollection.Add($myLookup);
    #Set the Lookup field value
    if([string]::IsNullOrEmpty($lookupValueCollection)){
    continue;
    else{
    $newItem["Lookupfieldinternalname"] = $lookupValueCollection
    The above logic has no hard coding and it fetches the lookup information directly from the master list and generates a collection based on that. You can modify the above code as per your requirement.
    Geetanjali Arora | My blogs |

  • Exception has been thrown while reading SSA via PowerShell

    Hi,
    SharePoint Server standard SP1 updated to June 2012 CU, 2 (WFE + App) servers + 1 DB server. I created Search Service Application (SSA) using Central Admin. Once created the SSA behaves pretty alright. It crawls and the searchadmin page is also normal.
    But when I try to read the SSA via PowerShell:
    $mySSA = Get-SPEnterpriseSearchServiceApplication -Identity "My Search Service App Name"
    I get:
    format-default : Exception has been thrown by the target of an invocation.
    + CategoryInfo     :  NotSpecified:  (:) [format-default], TargetInvocationException
    + FullyQualifiedErrorId : System.Reflection.TargetInovcationException,Microsoft.PowerShell.Commands.FormatDefaultCommand
    No relevant clue from the App error event log. I can run other PowerShell commandlets just fine. For example Get-SPWebApplication.
    Thanks, Soumya | MCITP, SharePoint 2010

    Do you have multiple Search Service Applications? If there is only one in the farm, you can run Get-SPEnterpriseSearchServiceApplication with no parameters to return it. 
    Actually, even if you have more than one, what happens when you simply run:
    Get-SPEnterpriseSearchServiceApplication
    Jason Warren
    Infrastructure Specialist
    Habanero Consulting Group
    habaneroconsulting.com/blog

  • Auditing cluster events - can we see who paused a node?

    Hello
    We have a 2 node cluster with an active passive configuration - running server 2008 r2 / SQL 2008
    We had an issue today where one of the nodes was paused; and the active node had an issue with the cluster services, which ended up taking the resources offline (as you would expect)
    I fixed the issue via resuming the paused node; failing over the resources and restarting the cluster services - and bringing the resources back online
    Im trying to find out the 'why' behind the inactive node being left paused, as such i want to know if there are any events logged when a node is paused (i.e. a security event)
    I did a test scenario on the server, I paused the node but nothing is logged in any of the usual event places. Does the inactive node have to be left paused for a certian period of time before the cluster events / cluster operations log start logging things?
    Any help would be appreciated

    Hello,
    After checking the cluster related logs and systme/application logs, it appears that there're no logs recorded when pausing a cluster node.
    And generally, pausing a node is usually done when applying software updates to the node, where the recommended sequence is to move all services and applications off of the node, pause the node, then apply software updates to the node.
    You may refer to the following link for more information.
    Pause or Resume a Node in a Failover Cluster
    http://technet.microsoft.com/en-us/library/cc731291.aspx
    Best Regards,
    Sophia Sun
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thanks - I was afraid of that
    I know that pausing a node is only usually done when updating / patching etc, but windows updates fore this cluster are not done whatsoever - which put me down this path to begin with
    Appreciate everyones input on this

  • Can you add delegate access to a user's calendar or mailbox folder via powershell?

    Basically I want to know if you can grant a user delegate access to another user's calendar or meeting room using native  powershell commands?
    I know you can do this via method 1, listed below, however when you grant permissions in this way and if a user wants to see who has delegate access to their calendar or inbox by going to delegate access in outlook they will not see user's who have access
    to their calendar or inbox.
    Method 1:
    Add-MailboxFolderPermission -Identity "userA:\Calendar" -User UserB -AccessRights editor
    The above is a nice and simple way of granting userB EDITOR access to UserA's calendar.
    But as stated above as you are using mailboxFolderPermissions and not DelegateAccess, this applies directly to this folder and if userA goes to their delegate access view in Outlook, they will not see that userB has access to their calendar.
    I know that you can use the below commands to see a list of user's who have delegate access to you calendar:
    Get-Mailbox userA | Get-CalendarProcessing | select resourcedelegates
    I am new to powershell and don't know if there is a way of setting delegate access to a user's calendar or inbox/folder via powershell commands, similar to the above.
    Any help with this query would be much appreciated!
    thanks

    Delegate access is simply a combination of folder rights (which you've described) and Send As right, which is conferred by Add-MailboxPermission or Send On Behalf of right, which I'm not sure if you can confer with PowerShell. Set-CalendarProesssing applies
    to resource mailboxes like conference rooms, not to user mailboxes.
    Update: "Send on Behalf of" is conferred this way:
    Set-Mailbox UserMailbox -GrantSendOnBehalfTo UserWhoSends
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • How to Add Multiple Driver Packages Using Reference File via PowerShell

    Hey All - 
    I've got a task I'm working on which would be much easier via PowerShell.  I tried figuring it out, but couldn't so thought I'd post.
    The Task
    I need to create about 50 new, empty driver packages (most are in the same folder in the console) and am trying to find a method of doing so where I may use a source text file / csv file as reference in the command line.  Each package has a unique name
    and source path.  Here are examples:
    - Latitude E5440 Win7 x86 [A01]   \\server\drivers\5440x86
    - Latitude E5440 Win7 x64 [A01]   \\server\drivers\5440x64
    The Structure
    All of the ones I want to add via PowerShell will go into the same folder in the console.  They will be in the folder "root\New Drivers\Dell CAB Drivers" 
    Any ideas or will this just take more time than it's worth for 50?  Thanks!
    Ben K.

    Also, the creation of the driver package won't be your biggest challenge, as it's as simple as New-CMDriverPackage (see:
    http://technet.microsoft.com/en-us/library/jj821724(v=sc.20).aspx).
    The biggest challenge is relating your models to a share name (unless they're all Latitude).
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • Server 2012 R2: How do I set VLAN data for the Host Virtual Switch (via PowerShell)?

    I need to modify the Host (NOT the VM's) VMSwitch VLAN settings via Powershell for automation purposes.
    In Server 2012 (NOT R2), this can be done via modifying
    MSVM_VLANEndPointSettingData
    However, it seems in Server 2012 R2, that class is gone. I've manually searched through the MSVM classes, and it seems that the Host VMSWitch VLAN settings are stored
    in MSVM_EthernetSwitchPortVlanSettingData. Unfortunately, I have no way of tying that class to a specific VMSwitch.
    Any know how to do this on Server 2012 R2?

    Hi,
    I found some similar issue with your case, however this forum is not focus on the develop related issue,
    Therefore I suggest you more about the develop question please post to the MSDN forum.
    The related information:
    Problem with CPU load and WMI errors when Hyper-V is installed?
    http://social.technet.microsoft.com/Forums/windows/en-US/4eca1f42-8630-48b4-85fa-e9569445d832/problem-with-cpu-load-and-wmi-errors-when-hyperv-is-installed
    The third party solution:
    How to: Fix error 0x80041010 on Windows 8.1 + Hyper-V
    http://www.seankilleen.com/2013/11/how-to-fix-error-0x80041010-on-windows.html
    MSDN forum Developer Network
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=WAVirtualMachinesVirtualNetwork&filter=alltypes&sort=lastpostdesc
    Thanks for your understanding and support.
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to determine the database mirroring role via Powershell?

    Is there a way to determine the current mirroring role of a database via Powershell without the use of t-sql?
    With the Microsoft.SqlServer.Management.Smo namespace and database class I can determine the status, witness and partner of the mirrored database, but I can't determine the mirroring role of the current database. I basically want to get the same result
    as the following t-sql query in powershell without using t-sql:
    SELECT m.mirroring_role_desc 
    FROM   sys.database_mirroring m JOIN sys.databases d
    ON     m.database_id = d.database_id
    WHERE  d.name = 'databasename'
    I find it very strange that there is no class property to check for this, while it is an important property of the database. Of course I can use the output of this query in my powershell script for further processing, but I still hope that there is a property
    where I can get this information.
    TheSultan8

    Just to let you know, I've already found it. Here is a part of the code that I use for checking each mirrored database what mirroring role it has:
    $sqlconnection="MYLAPTOP\SQL2008R2"
    $smo = New-Object ('Microsoft.SqlServer.Management.Smo.Server') $sqlconnection
    $mirroreddbs=$smo.Databases | where {$_.IsMirroringEnabled -eq "True"}
    $sqlversionmajor=$smo.VersionMajor
    foreach ($database in $mirroreddbs)
    # Versions lower than SQL 2008 can't query a database in recovery mode
    if ($sqlversionmajor -ge 10) 
    $dbrolevalue=$database.DatabaseOptions.Properties | where {$_.Name -eq "MirroringRole"}
    $dbrole=$dbrolevalue.Value
    One catch though, this only works on SQL 2008 and higher version.
    TheSultan8

  • [Forum FAQ] How to install and configure Windows Server Essentials Experience role on Windows Server 2012 R2 Standard via PowerShell locally and remotely

    As we all know,
    the Windows Server Essentials Experience role is available in Windows Server 2012 R2 Standard and Windows Server 2012 R2 Datacenter. We can add the Windows Server
    Essentials Experience role in Server Manager or via Windows PowerShell.
    In this article, we introduce the steps to install and configure Windows
    Server Essentials Experience role on Windows Server 2012 R2 Standard via PowerShell locally and remotely. For better analyze, we divide this article into two parts.
    Before installing the Windows Server Essentials Experience Role, please use
    Get-WindowsFeature
    PowerShell cmdlet to ensure the Windows Server Essentials Experience (ServerEssentialsRole) is available. (Figure 1)
    Figure 1.
    Part 1: Install Windows Server Essentials Experience role locally
    Add Windows Server Essentials Experience role
    Run Windows PowerShell as administrator, then type
    Add-WindowsFeature ServerEssentialsRole cmdlet to install Windows Server Essentials Experience role. (Figure 2)
    Figure 2.
    Note: It is necessary to configure Windows Server Essentials Experience (Post-deployment Configuration). Otherwise, you will encounter following issue when opening Dashboard.
    (Figure 3)
    Figure 3.
      2. Configure Windows Server Essentials Experience role
    (1)  In an existing domain environment
    Firstly, please join the Windows Server 2012 R2 Standard computer to the existing domain through the path:
    Control Panel\System\Change Settings\”Change…”\Member of. (Figure 4)
    Figure 4.
    After that, please install Windows Server Essentials Experience role as original description. After installation completed, please use the following command to configure Windows
    Server Essentials:
    Start-WssConfigurationService –Credential <Your Credential>
    Note: The type of
    Your Credential should be as: Domain-Name\Domain-User-Account.
    You must be a member of the Enterprise Admin group and Domain Admin group in Active Directory when using the command above to configure Windows Server Essentials. (Figure 5)
    Figure 5.
    Next, you can type the password for the domain account. (Figure 6)
    Figure 6.
    After setting the credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 7)
    Figure 7.
    By the way, you can use
    Get-WssConfigurationStatus
    PowerShell cmdlet to
    get the status of the configuration of Windows Server Essentials. Specify the
    ShowProgress parameter to view a progress indicator. (Figure 8)
    Figure 8.
    (2) In a non-domain environment
    Open PowerShell (Run as Administrator) on the Windows Server 2012 R2 Standard and type following PowerShell cmdlets: (Figure 9)
    Start-WssConfigurationService -CompanyName "xxx" -DNSName "xxx" -NetBiosName "xxx" -ComputerName "xxx” –NewAdminCredential $cred
    Figure 9.
    After you type the commands above and click Enter, you can create a new administrator credential. (Figure 10)
    After creating the new administrator credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 11)
    After a reboot, all the configurations will be completed and you can open the Windows Server Essentials Dashboard without any errors. (Figure 12)
    Figure 12.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Part 2: Install and configure Windows Server Essentials Experience role remotely
    In an existing domain environment
    In an existing domain environment, please use following command to provide credential and then add Server Essentials Role: (Figure 13)
    Add-WindowsFeature -Name ServerEssentialsRole
    -ComputerName xxx -Credential DomainName\DomainAccount
    Figure 13.
    After you enter the credential, it will start install Windows Server Essentials role on your computer. (Figure 14)
    Figure 14.
    After the installation completes, it will return the result as below:
    Figure 15.
    Next, please use the
    Enter-PSSession
    cmdlet and provide the correct credential to start an interactive session with a remote computer. You can use the commands below:
    Enter-PSSession –ComputerName
    xxx –Credential DomainName\DomainAccount (Figure 16)
    Figure 16.
    Then, please configure Server Essentials Role via
    Add-WssConfigurationService cmdlet and it also needs to provide correct credential. (Figure 17)
    Figure 17.
    After your credential is accepted, it will update and prepare your server. (Figure 18)
    Figure 18.
    After that, please type “Y” to continue to configure Windows Server Essentials. (Figure 19)
    Figure 19.
    2. In a non-domain environment
    In my test environment, I set up two computers running Windows Server 2012 R2 Standard and use Server1 as a target computer. The IP addresses for the two computers are as
    below:
    Sevrer1: 192.168.1.54
    Server2: 192.168.1.53
    Run
    Enable-PSRemoting –Force on Server1. (Figure 20)
    Figure 20.
    Since there is no existing domain, it is necessary to add the target computer (Server1) to a TrustedHosts list (maintained by WinRM) on Server 2. We can use following command
    to
    add the TrustedHosts entry:
    Set-Item WSMan:\localhost\Client\TrustedHosts IP-Address
    (Figure 21)
    Figure 21.
    Next, we can use
    Enter-PSSession
    cmdlet and provide the correct credential to start an interactive session with the remote computer. (Figure 22)
    Figure 22.
    After that, you can install Windows Server Essentials Experience Role remotely via Add-WindowsFeature ServerEssentialsRole cmdlet. (Figure 23)
    Figure 23.
    From figure 24, we can see that the installation is completed.
    Figure 24.
    Then you can use
    Start-WssConfigurationService cmdlet to configure Essentials Role and follow the steps in the first part (configure Windows Server Essentials Experience in a non-domain environment) as the steps would be the same.
    The figure below shows the status of Windows Server Essentials.
    Figure
    25.
    Finally, we have successfully configured Windows Server Essentials on Server1. (Figure 26)
    Figure 26.
    More information:
    [Forum
    FAQ] Introduce Windows Powershell Remoting
    Windows Server Essentials Setup Cmdlets
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • Removing rights to a mailbox via powershell issues

    I am trying to remove 2 rights to a mailbox via powershell.  the command I am running doesn't seem to work though.
    There are 2 service accounts that seem to have a deny setting on the mailbox; as shown in the screenshot.  user column is in
    Domain\User format.
    I am trying to remove these because I believe it is causing an integration issue between Cisco Unified messaging and outlook. (New voicemails do not show up in the inbox for this one user, even though tests from Cisco UM are ok.)
    Running this command doesn't seem to remove the entries I need:
    remove-MailboxPermission -Identity <USER ALIAS> -User
    <SERVICE ACCOUNT> -AccessRights FullAccess -InheritanceType all

    Hi BriGy,
    Base on my search, if you want to remove these service account permission, you need to remove from organizational level, not mailbox level.
    Please refer to the following thread, it may give you some hints:
    Deny permissions for Domain Admins on mailboxes
    Best regards,
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Niko Cheng
    TechNet Community Support

  • Import Files to SharePoint library via Powershell

    Hi,
    I'm a newbie to programming and I appreciate anybody who can help me out.
    I need to be able to import files from a shared folder to a SharePoint document library on a scheduled basis. I prefer to do this via Powershell. 
    Here are the requirements:
    1. Shared Folder is "D:\For_Upload". There's only one folder where all files for upload will be dumped. There are no subfolders.
    2. The SharePoint Document library named "Invoice" is where the files will be uploaded. This library contains a list of folders pertaining to Invoice numbers (e.g. 5200004720, 5200004721, 5200004722, and so on.). 
    3. The documents to be uploaded will have a filename containing the Invoice number and year. The uploaded document should be dumped to a folder with its corresponding invoice number and year in the document library. If no year is specified in the filename
    then it should automatically use the current year.
    4. If the said document filename does not correspond to any invoice number in the document library folders, the document will be dumped to another shared folder labeled "D:\Not_Uploaded"
    I appreciate anybody who can assist me with this.
    Regards,
    Terri

    try these links:
    http://stackoverflow.com/questions/22411014/sharepoint-script-to-automatically-import-documents-from-a-network-share-on-a-r
    https://spfolderimport.codeplex.com/
    https://camerondwyer.wordpress.com/2014/06/04/how-to-bulk-uploadcopy-a-folder-structure-and-files-to-sharepoint/

  • Remove various accepted domains (exchange 2007) from a list file via powershell

    hello!
    i'm a newbie with powershell and i'm trying to find if is it possible to remove a lot of exchange 2007 accepted domains from a csv file using powershell.
    I want to delete accepted domains contained in a csv, it has only domains name and powershell requires the name , that is different from the domain.
    example of accepted domain in my organization:
    Name                           DomainName                DomainType            Default
    Domain0001        
    domain1.com     Authoritative         False 
    Domain0002 hello1.com
    Authoritative False
    I've only a csv with domains name:
    domain.csv:
    Domain
    domain1.com
    hello1.com
    Deleting an accepted domain via powershell requires the name so I need to extract first the name of , i've tried with this command and it works:
    Get-AcceptedDomain | Where{$_.DomainName -eq 'domain1.com'}
    This works only for 1 domain, I've a lot of domains to delete so it's inviable
    Now, i'm trying to launch this command without success:
    import-csv domain.csv | foreach {Get-AcceptedDomain | Where{$_.DomainName -eq '$_.Domain'}}
    Probably there is a syntax error, or maybe I just can't do it. 
    Any help? 
    Many thanks in advance!!

    Don't know what to tell you, then.  If I create a test file with that data, the Import-CSV works for me:
    Domain
    3414257440.domain.com
    domain1.domain.com
    '@ | set-content c:\testfiles\domain.csv
    $DomainNames =
    Import-CSV 'c:\testfiles\domain.csv' |
    Select -ExpandProperty Domain
    $DomainNames
    3414257440.domain.com
    domain1.domain.com
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Outlook Delegate via Powershell (Exchange Online)

    I'm trying to set a delegate for a mailbox via powershell in Exchange Online (Office 365), but the delegated user does not receive the "Meeting Accepted" messages. I've tested it with my account, and I don't get the meeting accept
    messages.
    I've read that the ResourceDelegates parameter for Get-CalendarProcessing is only for resource mailboxes, yet when I set the delegate as Editor on the Calendar and give
    them GrantSendonBehalfTo, it updates the ResourceDelegates to that user. 
    All of that aside, the fact that I got this to work before but I can't now is driving me absolutely insane. I know that you can set the delegate within Outlook, and then set it to forward the meeting messages to the delegate, but I can't seem to get it to work
    via powershell. Help?

    Hi,
    As Ed suggested, actually, we have a dedicated support team regarding the Microsoft Office 365. I recommend you ask your question on our Office 365 forum which is staffed by more experts specializing in this kind of problems. Thanks for your understanding.
    If you have any problem with Exchange server, welcome to our Exchange server forum.
    Hope it helps.
    Best regards,
    Amy Wang
    TechNet Community Support

  • Add Multiple Domains as an External Relay via powershell from a list

    Hello, 
    I have a requirement to add a few hundred external domains as a relay and would like to accomplish this via powershell. I'm familiar with the command to submit 1 at a time but would like to have it read them all in from a list if possible. Any help would
    be great! 
    Thank you, 
    Eric 

    Hello Eric,
    Just replied similar question in a thread, you can refer to that...
    http://social.technet.microsoft.com/Forums/exchange/en-US/b84cd2e7-5fb3-4a1d-9bcc-41acdb7142a2/adding-multiple-accepted-domains-with-importcsv?forum=exchangesvrdeploy

Maybe you are looking for

  • How many files can the Finder move at a time between folders?

    I have about 45000 files to move from one folder to another. Trying to do it in one jump by highlighting them all and trying to drag them froze the Finder. What would be the maximum in a single jump?

  • Convert word 2010 TOC to pdf without numbering and hyperlink errors

    I made an automatic TOC (Table of Contents) for my Manual of procedures using the automatic creation under the Reference tab-create a table of contents. It looks great in word. I made sure the hyperlink is clicked in word as well. When I convert this

  • Why won't my Apple TV display the setup screen?

    Why won't my Apple TV display the setup screen? I have changed hdmi cable, confirmed the correct input, checked connection but nothing. HELP!!! I have a Bose System and use a universal remote, Logitech. Could this be a factor?

  • Custom View Handler

    I am creating a custom view handler , but I want that this view is used only for specific files(views) and for all other files I want that default handler to be used , can we do this in JSF ??If yes then how ??

  • Enum type

    Hi, I have tried to add an enum type to my app but the IDE shows an error! Unexpected token identifier. My JDeveloper version is 10.1.3 and the Java platform component version is 1.5.6 Any ideas? Thanks in advance.