Get related Distibuted Application using Powershell from an Alert
Hi,
I'm wondering if there is a way to get the name of a Distributed Application from an alert.
Ie Alert for a website comes into SCOM. This alert is from an object in a Distributed Application. I'd like to get that name.
I'm close, I can get the related top level object (which gives me the System.Health.EntityState Monitor)
There has to be a way of doing this, either by Powershell or SQL
My Code:
$ClassID= get-scomalert -id <alertid> | foreach {$_.MonitoringClassId}
$name = get-scomalert -id <alertid>| foreach {$_.MonitoringObjectDisplayName}
$info= get-scomclass -id $ClassID | Get-SCOMClassInstance |where {$_.DisplayName -like $name} | %{$_.GetRelatedMonitoringObjects()}
$object=$info.GetStateHierarchy().item
Any Ideas?
Thanks
Jason
Hi, as example you can check the presence of this alert in each DA and identify where it exists
$AlertID="GUID"
$DAs=Get-SCOMClass -Name System.Service | Get-SCOMClassInstance
Foreach ($DA in $DAs)
if ($DA.GetMonitoringAlerts("ResolutionState = 0","Recursive",0).id -contains $AlertID) {write-host $DA.Displayname}
Similar Messages
-
Create SharePoint 2010 Search Service Application Using Powershell
Hi Team,
Could you please assist me in completing the search service application for
two server using powershell. Both the servers will be running all the component
Version SharePoint 2010
# 1.Setting up some initial variables.
write-host 1.Setting up some initial variables.
$SSAName = "Search Service Application"
$SVCAcct = "Domain\ServiceAccount"
$SearchAppPoolName ="DefaultAppPool"
$SSI = get-spenterprisesearchserviceinstance -local
$err = $null
$SSADBName="Search_AdminDB"
$SSADBServer="DBServer"
$host1="Server1"
$host2="Server2"
# Start Services search services for SSI
write-host Start Services search services for SSI
Start-SPEnterpriseSearchServiceInstance -Identity $SSI
# 2.Create an Application Pool.
write-host 2.Create an Application Pool.
#$AppPool = new-SPServiceApplicationPool -name $SSAName"-AppPool" -account $SVCAcct
$AppPool = Get-SPServiceApplicationPool -Identity $SearchAppPoolName -ErrorAction SilentlyContinue
# 3.Create the SearchApplication and set it to a variable
write-host 3.Create the SearchApplication and set it to a variable
$SearchApp = New-SPEnterpriseSearchServiceApplication -DatabaseServer $SSADBServer -Name $SSAName -applicationpool $AppPool -databasename $SSADBName
#4 Create search service application proxy
write-host 4 Create search service application proxy
$SSAProxy = new-spenterprisesearchserviceapplicationproxy -name $SSAName"ApplicationProxy" -Uri $SearchApp.Uri.AbsoluteURI
# 5.Provision Search Admin Component.
write-host 5.Provision Search Admin Component.
set-SPenterprisesearchadministrationcomponent -searchapplication $SearchApp -searchserviceinstance $SSI
# 6.Create a new Crawl Topology.
write-host 6.Create a new Crawl Topology.
$CrawlTopo = $SearchApp | New-SPEnterpriseSearchCrawlTopology
New-SPEnterpriseSearchCrawlComponent -SearchTopology $newTopology -SearchServiceInstance $hostA
Source:blog.MSDN Author- Russ Maxwell
Thanks BasvaCould you please assist me in completing the search service application for
two server using powershell. Both the servers will be running all the component
Hi Basva,
Do you want to provision two search service applications in single farm?
Commonly, only one search service application is needed in a farm for Search function.
Here are articles for detail information about how to provision search service application using powershell:
http://blogs.msdn.com/b/jjameson/archive/2011/02/28/powershell-script-to-configure-search-in-sharepoint-server-2010.aspx
http://blogs.msdn.com/b/russmax/archive/2009/10/20/sharepoint-2010-configuring-search-service-application-using-powershell.aspx
Regards,
Rebecca Tu
TechNet Community Support
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] -
How can I query a https website used to display the status of an application using Powershell?
Need assistance on querying the status of an application using Powershell. The status of the application is displayed in a https website. I want to receive a notification when one of the listed applications fails.
Below is an example the failures I need to capture.
h-t-t-p-::://xpps2.xxcom/ssol/sSOLStatus.asp?autorun
SSOL Status
Current App Server: xpps2.xx.com
SQL Server Details:
SSS_MyAccount DB Connection: PASS
SSS_MyAccount DB Query: PASS
CAGWEB DB Connection: FAIL - Unable to Connect
CAGWEB DB Query: FAIL - Pay location not found
DB2 Server Details:
DB2 D Connection: PASS
DB2 Q Query: FAIL -Acct not found
DB2 X Query: PASS
DB2 N Query: PASS
DB2 S Query: PASS
DB2 K Query: PASS
DB2 I Query: PASS
Mitem Server Details:
MITEM server: MITEMP2
MITEM Total Devices: 10
MITEM Devices Lines Up: 10
MITEM Devices Logged In: 10
MITEM Devices In Use: 0
Mitem Server Status: PASS
Web Service Details:
SAW Web Service Status: FAIL
Maximo Vizcainothats where you are going to check what it is supposed to be.
lets say your page shows as SSOL Status : running you
probably want to use "if($totalstrng.ToLower().contains("ssqlL status
: running"))". its
checking if the html page contains the string you are looking for.
you might want to print $totalstrng
and see what you need to look for.
usign XMLHttp
or XML object as mentioned by JRV might be easier and faster way. -
How to get Metadata column values using powershell(CSOM)
Hi,
I am trying to get list column values using Powershell (CSOM), but I am getting for Metata data columns.
I am getting internal value as System.Collections.Generic.Dictionary`2[System.String,System.Object]
Can anybody let me know how to get the values for metadata columns?
Any help would be greatly appreciate.
Thank you.
AA.Hi
Go through the links. It'll help.
SharePoint 2013 Code Tips – Setting a Managed Metadata Field with the Client Object Model(CSOM and JSOM)
Indul Hassan
Microsoft Community Contributor
http://www.indulhassan.com
You Snooze.. You Lose !! -
How to pass input arguments to Worker Role Application using Powershell
Hi All,
I have a worker role running in Windows Azure Portal. I need to pass arguments to this Worker role service and get the output by using PowerShell.
Can someone please specify how this can be achieved using PowerShell?
Thanks and Regards,
VivekHi,
Please refer to the Following StackOverflow article that talks about how to configure PAAS instances for Powershell remoting.
http://stackoverflow.com/questions/15787768/accessing-azure-cloud-service-paas-instances-via-powershell-remoting
Regards,
Nithin Rathnakar -
How to get Systemstate Backup size using PowerShell command in Windows 2008 R2
Hi,
We using WBSummary command to get completed backup status.
I need to find how much data is backed up using powerShell command .
Is there any way to get the details , i can see the GUI but no in command.
Please advise
Regards Gopi KHi,
You mentioned that you can see the system state backup size in the GUI. Does the backup size mean the amount of date transferred?
It seems that there is no such a PowerShell to get Systemstate Backup size. You may need to you need a PowerShell scripts to do this work.
http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=ITCG
Regards,
Mandy
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. -
Remove configuration custom STS with old web application using powershell ?
HI
i configured a custom sts with sharepoint 2010 web application using following commands,
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("c:\signing.cer")
$map1 = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "EmailAddress" –SameAsIncoming
$map2=New-SPClaimTypeMapping -IncomingClaimType "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" -IncomingClaimTypeDisplayName "Role" –SameAsIncoming
$realm=”http://claimauthweb/_trust/default.aspx”
$ap=New-SPTrustedIdentityTokenIssuer -Name "SimplePassiveSTS" -Description "A simple Asp.Net STS on DevBox." –Realm $realm -ClaimsMappings $map1,$map2 -ImportTrustCertificate $cert -SignInUrl "https://devbox/SimpleSTS/default.aspx" -IdentifierClaim $map1.InputClaimType
after that i create the new web application with claimauthweb and selected trusted identity provider.
but when i create again new web application with different name and ip , after when i login to new web application using custom
sts it redirects to sts login page and after it goes to claimauthweb application not the new web application.
so here how i unregister with old web application and again register sts with new web applicatio?
adilI believe if you want to run this you will need to remove the provider from all Web Applications in CA. Then you should be able to run Remove-SPTrustedIdentityTokenIssuer.
If this is helpful please mark it so. Also if this solved your problem mark as answer. -
I've attempted to send an email from my [email protected] but it won't recognize the group because somewhere as it was syncing it dropped all the members out of the group and I no longer have any of my contacts in my Outlook address book. How do I get these contacts back into my Outlook address book without individually re-entering them?
I think i did the same thing. I just got a new MacBook Air and when it synced with iCloud I had doubles of all my contacts. Now I'm missing most of my contacts as well.... Someone please help with a solution to this mistake....
-
Get string inside brackets - Using Scan from string
I have a very basic question here. I would like extract a portion of a string which is inside brackets (Example: I work with [National Instruments]). In the string I only want to extract National Instruments, I do know logic to extract by finding the brackets and extracting them. But I am interested in using the Scan from string or possibly any other primitive in one shot. Please suggest if anyone has any idea, I am really not use to the format specifiers. I got this link for reference but I am not able to figure out a solution.
The best solution is the one you find it by yourself
Solved!
Go to Solution.Hi,
I cannot say that it is the best solution, I use two Scan From String functions instead of one but it does work, so far ;-)
I use Characters in set.
I could not attach VI so FP is below.
Duri -
Remove-Mailboxes using Powershell from CSV file
hello all ,
I encountered in problem with my exchange Server 2010
I have a mission to delete closed 150 Mailboxes in my organization
I tried a lot times to use the command "Remove-mailbox " and i anytime got error
I would appreciate the help of one of you maybe guide me because is very important for me to resolve this problem
so meantime i did export of mailbox from exchange server with content "Userpricplename" to CSV file after than export does success i did filtering and tried to perform this commad :" import-csv c:\Mailboxes.csv | foreach {Remove-Mailbox -userprincipalname
$_.Emailadress }
please see the errors below :
excel content :
website: www.PelegIT.co.ilHi ,
If we set -Confirm:$false EMS will not prompt for yes or no option while executing commands in shell.
If we set -Confirm:$true EMS will prompt for yes or no option while executing commands in shell.
Thanks & Regards S.Nithyanandham -
Is there anyway to have an application use the output for Alerts/Sound Effects?
I am trying to set some applications to use the output designated for the System Alerts and Sound Effects, while other applications continue to use the regular Output? I am using the Audio MIDI Utility with Aggregate/Multiple Outputs.
An action can specify the resources that it needs, which will trigger alerts if they are not there. Assuming that the system resources are there, you can include actions in an application bundle - see the Installing Actions section of the Automator Programming Guide.
-
Configure service application associations using PowerShell
Hi all,
I have configured my service applications with PowerShell scripts and created a new web applications (also with PowerShell scripts).
However, I don't seem to find the necessary information on how to configure the service application to be used by this new web application using PowerShell cmdlets.
Any idea on how to do this?
Thanks in advance,
FlorinWhat you're describing is called a Proxy Group. You add Service Application Proxies to the Service Application Proxy Group, and that Proxy Group is assigned to the Web Application.
Step 1:
Use
New-SPServiceApplicationProxyGroup
Step 2:
Add Service Application Proxies by adding Members via
Add-SPServiceApplicationProxyGroupMember
Step 3:
Assign the Proxy Group to the Web Application via
Set-SPWebApplication -ServiceApplicationProxyGroup
Let us know if you need further help.
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
Get the connected users count from sql server using powershell
Hi,
I am working on SharePoint 2013,I am having SQL server 2012.
I want to get the Connected Users count from sql server using power shell.
Can any one please let me know how to implement.
Thanks in advance.
Regards,
Phani Kumar RSorry Tom, I dont like to hear "There is no way" :-(
There is always a way in computer to get what you need (at least it is good as Rule of thumb). I am not sure we will find it here (in a voluntary supporting forum).
Now we (or better the architect of their system) should think of the way :-)
Of course doing so in the forum, while we do know the system and only got a glimpse on what is needed, is not the best idea. I will point some issues which can be related to a solution. Those are not a solotions as it is but something we can use for a solution
once something look in the right way.
* A web connects counter is one of the easier thing to do. The basic idea is just to use the connect event and the disconnect event an adding 1 or removing 1 from the counter. This is best to do in the application using static variable as any way the second
the application is down the counter can be go to hell as we know there is no one connect (there for a counter do not use database usually). Using a web dot-net (or asp 3) application this is done most of the time using the global.asa/global.asax file, which
include the application and session events. for example using the method Session_Start
protected void Session_Start(object sender, EventArgs e) {
// Code that runs when a new session is started
* IIS have a build-in loging system where we can log each and every request/response or only logins users. There is lot we can do with this log files including data mining. Using small bulk insert script we can use the SQL agent to insert those logs to the
database and get the information we need.
* any web developer i want to believe know about the Fiddler application which we use to monitor traffic. A proxy is not the only way to to monitor traffic (it is not good for our case as this is in the client side), there are several option in the server
side.
* SQL trigger on logon can be use to get information on who is loging on and can be logging only specific source (like our sharepoint IP or any sharepoint application). This information (what is the application which connect to the server can be retrive
in several solution without using a trigger as well)
*** (I'll be brief ... I'm getting bored... probably the reader feel the same)
* using extended events and/or profiler we can monitor any connection and save the data or just remember it in shared (static) variable (this
blog show how to do it by the way). Again we can monitor specific application or use any filter in order to get only the sharepoint users
.... and i can continue for several days more :-) ...
"If there is a willing, then there's a way"
"If you can't do it, Then someone else probably can"
"Never say never"
I hope this help somehow :-)
[Personal Site] [Blog] [Facebook] -
Best way To get data from another application using NDDE lbrary
My vb.net application gets data from another application using NDDE Library. I got stocks prices (open,high,low,close,volume,change......(about 15 records for each stock)) (about 200 stocks) . I don't know if there is a problem in my code.
This is my code:
l : is the list of stocks.
This Sub connects to server and requests the data :
Public Shared Sub GetQuotes()
Try
client1 = New DdeClient(server, topic)
client1.Connect()
For i As Integer = 0 To l.Count - 1
client1.StartAdvise("QO." & l(i).t & ".TAD$last", 1, True, 60000)
client1.StartAdvise("QO." & l(i).t & ".TAD$open", 1, True, 60000)
client1.StartAdvise("QO." & l(i).t & ".TAD$high", 1, True, 60000)
client1.StartAdvise("QO." & l(i).t & ".TAD$low", 1, True, 60000)
client1.StartAdvise("QO." & l(i).t & ".TAD$pclose", 1, True, 60000)
client1.StartAdvise("QO." & l(i).t & ".TAD$volume", 1, True, 60000)
client1.StartAdvise("QO." & l(i).t & ".TAD$date", 1, True, 60000)
client1.StartAdvise("QO." & l(i).t & ".TAD$time", 1, True, 60000)
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
and then I get the data from Client_advise sub (called each time a value changed )and fill the list. What I know is that client advise gets only one record for single stock each time is called..
Example: for stock AAPL. 1st time enters client_Advise I get open price for AAPL, 2nd time I get high price for AAPL,3rd time I get low price..... and I update the value in the List (l)
This the client_Advise Sub:
Private Shared Sub client1_Advise(ByVal sender As Object, ByVal e As NDde.Client.DdeAdviseEventArgs) Handles client1.Advise
For q As Integer = 0 To l.Count - 1
If l(q).t = w(1) Then
Dim item() As String = e.Item.Split("$")
If l(q).Open = "#" Then
l(q).Open = "0"
End If
If l(q).hi = "#" Then
l(q).hi = "0"
End If
If l(q).lo = "#" Then
l(q).lo = "0"
End If
If l(q).Close = "" Or l(q).Close = "#" Then
l(q).Close = "0"
End If
If l(q).pclose = "#" Then
l(q).pclose = "0"
End If
If item(1) = "open" Then
l(q).Open = Format(Val(e.Text), "0.00")
ElseIf item(1) = "last" Then
l(q).Close = Format(Val(e.Text), "0.00")
ElseIf item(1) = "high" Then
l(q).hi = Format(Val(e.Text), "0.00")
ElseIf item(1) = "volume" Then
l(q).Volume = Val(e.Text)
ElseIf item(1) = "low" Then
l(q).lo = Format(Val(e.Text), "0.00")
ElseIf item(1) = "pclose" Then
l(q).pclose = Format(Val(e.Text), "0.00")
If l(q).pclose <> "" And l(q).pclose <> "#" And l(q).Close <> "" And l(q).Close <> "#" Then
l(q).c = Format(l(q).Close - l(q).pclose, "0.00")
l(q).cp = Format(((l(q).Close - l(q).pclose) / l(q).pclose) * 100, "0.00")
End If
l(q).flag1 = 2
ElseIf item(1) = "date" Then
l(q).Date1 = e.Text
ElseIf item(1) = "time" Then
l(q).Time = e.Text
End If
Exit For
End If
Next
End Sub
Am I doing something wrong which inreases CPU usage to 80 or 90 % ?
Thanks in advance.Hi MikeHammadi,
According to your description, you'd like to get data from another app using NDDE library.
When using the NDDE library, the CPU usage is high. As the NDDE library is third-party library, it is not supported here. I suggest you checking if the problem is caused by the NDDE library.
If you'd like to get data from another app. I suggest you could save the data in the dataBase, and then read it in another application if necessary.
If you have any other concern regarding this issue, please feel free to let me know.
Best regards,
Youjun Tang
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.
Click
HERE to participate the survey. -
How can I get a list of OOB Site from a SharePoint WebApplication using Powershell Script
Hi,
Could anybody help on this?
Thanks,
Srabon
srabonYou can include the WebTemplate parameter in the select, from that you will get the template ID for all sites.
I am sure you know the custom template IDs then just filter / use if else to get the desired results.
check this blog, track inventory session.
http://sharepointpromag.com/sharepoint-2010/inventorying-sharepoint-using-powershell
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog
Maybe you are looking for
-
How do I set up individual or minor accounts for game center under iOS 7.0.4?
I have three ipad minis (one for each kid). They are all set up through my apple account with my apple ID. How do I set up game center so that they aren't sharing game stuff. They each want their own game center?
-
Moved pictures to trash.Have I lost everything?
I was trying to tidy my computer and create more space by deleting loads of files I no longer needed. At the time, I didn't realise that the iphoto heart and brain was kept in 'pictures' and moved all pictures content to trash, thinking it was just c
-
Fader Doesn't Work on Automated Tracks?
Sorry if that sounds nooby. I've recently migrated to Logic Pro X from Reaper. I'm really enjoying LPX, except Flex Pitch that keeps creating artifacts on my vocal tracks. But that's not why I'm here for. I've already automated all of my tracks in th
-
WSRP - InvalidCookieFault: The Producer environment has timed out.
class com.bea.wsrp.faults.TransportException oasis.names.tc.wsrp.v2.types.InvalidCookieFault: EJPWC1104E: The Producer environment has timed out. The Consumer needs to invoke initCookie() again. Consumer: Weblogic Portal 10.2 Producer: Websphere Port
-
Screen content has suddenly gotten enlarged and off screen. Solution??
Everything the bar on the top, and the dock have been pushed off screen. Everything is larger. It's an easy solution, what is it please? Thank you.