Second queston using powershell in SCOM as recovery
Hi guys,
In a previous question i needed some ideas about using powershell in a recovery.
Now i've implemented this in the XML, but it gives me this error as i import my managementpack back in SCOM 2012 R2 UR 2
Error, it gives the error on Microsoft.Windows.PowerShellWriteAction too:
If any management packs in the Import list are dependent on this management pack, the installation of the dependent management packs will fail.
Cannot resolve identifier Windows!Microsoft.Windows.PowerShellWriteAction in the context of management pack ANWB.Informatica.Powercenter0. Unknown alias: Windows.
<Recovery ID="MomUIGenaratedRecovery7187d8e283b44c9c9a115f06af5d3dcc" Accessibility="Public" Enabled="true" Target="Type603f92b7b83945598af55495615db953" Monitor="UIGeneratedMonitor0cd347f57f3949deb958cebb02d25555" ResetMonitor="false" ExecuteOnState="Error" Remotable="true" Timeout="300">
<Category>Custom</Category>
<WriteAction ID="MomUIGenaratedModule8ea82cdaccd8404b810409334cc50e47" TypeID="Windows!Microsoft.Windows.PowerShellWriteAction">
<ScriptName>SendSMS-XMLPOST.ps1</ScriptName>
<Arguments />
<ScriptBody>function SendSMS{
param([string]$url, [int]$customer, [string]$login, [string]$password, [string]$recipient, [string]$sender, [string]$message, [string]$reference)
$xml = New-Object XML
$messages = $xml.CreateElement("MESSAGES")
Vladimir,
Thanks for your response.
Ofcourse i can. Here you got my XML. These are my changes to the XML:
In the typedefenitions -> moduletypes:
<ModuleTypes>
<!-- ABO ADDED code 18-07-2014 -->
<WriteActionModuleType ID="Microsoft.Windows.PowerShellWriteAction" Accessibility="Public" Batching="false">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>Microsoft.Windows.PowerShellSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element name="ScriptName" type="NonNullString" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="ScriptBody" type="NonNullString" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="SnapIns" type="SnapInsType" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="Parameters" type="NamedParametersType" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="TimeoutSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="StrictErrorHandling" type="xsd:boolean" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="SerializationDepth" type="xsd:integer" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int" />
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<WriteAction ID="PowerShellWriteAction" TypeID="Microsoft.Windows.PowerShellWriteActionBase">
<ScriptName>$Config/ScriptName$</ScriptName>
<ScriptBody>$Config/ScriptBody$</ScriptBody>
<SnapIns>$Config/SnapIns$</SnapIns>
<Parameters>$Config/Parameters$</Parameters>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<OutputType>SerializedObjectData_OpsMgrSerialization</OutputType>
<StrictErrorHandling>$Config/StrictErrorHandling$</StrictErrorHandling>
<SerializationDepth>$Config/SerializationDepth$</SerializationDepth>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="PowerShellWriteAction" />
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>Microsoft.Windows.SerializedObjectData</OutputType>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>
<WriteActionModuleType ID="Microsoft.Windows.PowerShellWriteActionBase" Accessibility="Internal" Batching="false">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>Microsoft.Windows.PowerShellSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element name="ScriptName" type="NonNullString" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="ScriptBody" type="NonNullString" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="SnapIns" type="SnapInsType" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="Parameters" type="NamedParametersType" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="TimeoutSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="OutputType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="SerializedObjectData_OpsMgrSerialization" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="StrictErrorHandling" type="xsd:boolean" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="SerializationDepth" type="xsd:integer" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</Configuration>
<ModuleImplementation Isolation="Any">
<Managed>
<Assembly>Microsoft.EnterpriseManagement.Modules.PowerShell, Culture="", PublicKeyToken="31bf3856ad364e35", Version="6.0.4900.0"</Assembly>
<Type>Microsoft.EnterpriseManagement.Modules.PowerShell.PowerShellProbeActionModule</Type>
</Managed>
</ModuleImplementation>
<OutputType>Microsoft.Windows.SerializedObjectData</OutputType>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>
</ModuleTypes>
<!-- ABO ADDED code 18-07-2014 -->
And in the monitor recovery:
<!-- ABO ADDED code 18-07-2014 -->
<Recovery ID="MomUIGenaratedRecovery7187d8e283b44c9c9a115f06af5d3dcc" Accessibility="Public" Enabled="true" Target="MPAuthoring.PowerShellScript.ServiceTarget" Monitor="MPAuthoring.PowerShellScript.ServiceMonitor" ResetMonitor="false" ExecuteOnState="Warning" Remotable="true" Timeout="300">
<Category>Custom</Category>
<WriteAction ID="ServiceRestartScriptWriteAction" TypeID="Windows!Microsoft.Windows.PowerShellWriteAction">
<ScriptName>SendSMS-XMLPOST.ps1</ScriptName>
<Arguments />
<ScriptBody>function SendSMS{
param([string]$url, [int]$customer, [string]$login, [string]$password, [string]$recipient, [string]$sender, [string]$message, [string]$reference)
$xml = New-Object XML
$messages = $xml.CreateElement("MESSAGES")
$customerxml = $xml.CreateElement("CUSTOMER")
$customerxml.SetAttribute("ID", $customer)
$messages.AppendChild($customerxml)|Out-Null
$user = $xml.CreateElement("USER")
$user.SetAttribute("LOGIN", $login)
$user.SetAttribute("PASSWORD", $password)
$messages.AppendChild($user) |Out-Null
if (!($reference.Equals(''))) {
$refxml = $xml.CreateElement("REFERENCE")
$refxml.Innertext = $reference
$messages.AppendChild($refxml) |Out-Null
$tariff = $xml.CreateElement("TARIFF")
$tariff.InnerText = 0
$messages.AppendChild($tariff) |Out-Null
$msg = $xml.CreateElement("MSG")
$from = $xml.CreateElement("FROM")
$from.InnerText = $sender
$msg.AppendChild($from) |Out-Null
$to = $xml.CreateElement("TO")
$to.InnerText = $recipient
$msg.AppendChild($to) |Out-Null
$body = $xml.CreateElement("BODY")
$body.SetAttribute("TYPE", "TEXT")
$body.InnerText = $message
$msg.AppendChild($body) |Out-Null
$messages.AppendChild($msg) |Out-Null
$xml.AppendChild($messages) |Out-Null
Write-Output $xml.OuterXml
$webClient = New-Object net.WebClient
return ($webClient.UploadString($url, $xml.OuterXml))
# test
SendSMS -url 'https://sms.nl/' -recipient 0031123456789 -customer 1 -login 1 -password 'password' -sender 'Standby' -message 'Test' -reference '1234'</ScriptBody>
<!-- ABO ADDED code 18-07-2014 -->
Similar Messages
-
How can I find what scom group a specific server belongs to using powershell?
Environment: SCOM 2007 r2
Server in question: Running Windows 2003 Std. (yes I know this sounds crazy)
Why do I need this: I noticed at the console level we have had server unexpected shutdown events which are not generating email notifications.
Source shows: Windows 2003 Server Standard Edition
Alert Rule: Windows Shutdown Unexpectedly
From what I see these are all windows 2003 server Std edition systems. I did a track and trace using our exchange tracking system which confirmed the alerts were not being emailed. Not sure if there is a better approach for this, but not being a sql
expert (however I do have someone I can leverage) I am trying to see if I can somehow extract this information using powershell.
Secondary general question: How can I find out the current size of our scom 2007 database and the number of objkects\servers being monitored? This is prep work for a migration over to 2012.
Thanks in advance for the help!1. what scom group a specific server belongs to
function Get-GroupNames {
[cmdletbinding()]
param($computerFQDN)
$containmentRel = Get-RelationshipClass -name:’Microsoft.SystemCenter.InstanceGroupContainsEntities’
$computerClass = Get-MonitoringClass -name:”Microsoft.Windows.Computer”
$criteria = [string]::Format(“PrincipalName = ‘{0}’”,$computerFQDN)
try {
$computer = Get-MonitoringObject -monitoringClass:$computerClass -criteria:$criteria
$relatedObjects = $computer.GetMonitoringRelationshipObjectsWhereTarget($containmentRel,[Microsoft.EnterpriseManagement.Configuration.DerivedClassTraversalDepth]::Recursive,[Microsoft.EnterpriseManagement.Common.TraversalDepth]::Recursive)
catch {
$_
write-host “An error occurred while querying groups of $computerFQDN”
foreach($group in $relatedObjects)
[array]$Groups = $groups + $group.SourceMonitoringObject.DisplayName
if($groups) {
return $groups
} else {
write-host “No groups available for $computerFQDN”
Usage:
Get-GroupName -ComputerFQDN myserver1
for detail, pls. refer to
http://techibee.com/powershell/powershell-get-scom-groups-of-a-computer-account/1129
Roger -
How do i install mysql on windows server 2012 r2 using powershell(automate)??
i have a requirement of installing the mysql server with one click deployment using power shell by passing the parameters needed into the mysql console. can i achieve that ?
can anyone help me in doing that?
thanks in advance.
Suresh GaddamHi Suresh,
This forum is for SCOM related questions, it seems like that you are asking for powershell script to install Mysql. From my point of view, I don't think that using powershell to install Mysql is an easy way, as it is hard to say whether Powershell can get
information from Mysql install console with some API.
In addition, for further assistance, please contact MySQL forum and Powershell forum.
Thanks for your understanding!
Regards,
Yan Li
Regards, Yan Li -
How to set volume using Powershell script?
I would like to know on how to set volume under Window 7 Home 64 bits system using Powershell script.
Such as 8000 levels as default
Does anyone have any suggestions?
Thanks in advance for any suggestions
Thanks in advance for any suggestionsTry this.
Function Set-SpeakerVolume{
Param (
[switch]$min,
[switch]$max,
[int]$Percent
$wshShell = new-object -com wscript.shell
If ($min){
1..50 | % {$wshShell.SendKeys([char]174)}
ElseIf ($max){
1..50 | % {$wshShell.SendKeys([char]175)}
elseif($Percent){
1..50 | % {$wshShell.SendKeys([char]174)}
1..($Percent/2) |% {$wshShell.SendKeys([char]175)}
Else{
$wshShell.SendKeys([char]173)
This works in Windows 8.1.
Stolen / Modified from
http://blogs.technet.com/b/heyscriptingguy/archive/2013/07/28/weekend-scripter-cheesy-script-to-set-speaker-volume.aspx, which took me 20 seconds of (apparently) lucky searching.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book:
Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}}) -
Is it possible to monitor State change of a .CSV file using powershell scripting ?
Hi All,
I just would like to know Is it possible to monitor State change of a .CSV file using powershell scripting ? We have SCOM tool which has that capability but there are some drawbacks in that for which we are not able to utilise that. So i would like
to know is this possible using powershell.
So if there is any number above 303 in the .CSV file then i need a email alert / notification for the same.
Gautam.75801Hi Jrv,
Thank you very much. I modified the above and it worked.
Import-Csv C:\SCOM_Tasks\GCC2010Capacitymanagement\CapacityMgntData.csv | ?{$_.Mailboxes -gt 303} | Export-csv -path C:\SCOM_Tasks\Mbx_Above303.csv;
Send-MailMessage -Attachments "C:\SCOM_Tasks\Mbx_Above303.csv" -To “[email protected]" -From “abc@xyz" -SMTPServer [email protected] -Subject “Mailboxex are above 303 in Exchange databases” -Body “Mailboxex are above 303 in Exchange databases"
Mailboxex - is the line which i want to monitor if the values there are above 303. And it will extract the lines with all above 303 to another CSV file and 2nd is a mail script to email me the same with the attachment of the 2nd extract.
Gautam.75801 -
Using PowerShell to add VBA to an Excel spreadsheet
I have a PowerShell script that creates an Excel spreadsheet and is able to save it. I also have VBA code that I would like to put into that newly created spreadsheet.
Is there a way of adding the VBA code into my newly created spreadsheet using PowerShell?
Thanks,Thanks for the response Alex,
Where I use to work, we would commonly do this with VBScript and Excel 2003. Below is an example from the Scripting Repository using VBScript (Add a Macro
to an Excel Spreadsheet)
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.DisplayAlerts = False
Set objWorkbook = objExcel.Workbooks.Open("C:\scripts\test.xls")
Set xlmodule = objworkbook.VBProject.VBComponents.Add(1)
strCode = _
"sub test()" & vbCr & _
" msgbox ""Inside the macro"" " & vbCr & _
"end sub"
xlmodule.CodeModule.AddFromString strCode
objWorkbook.SaveAs "c:\scripts\test.xls"
objExcel.Quit
We would use a variant of this method to generate static Excel reports from spreadsheets that were linked to external data sources.
Now... it's time for me to upgrade my code and get on the PowerShell boat :) So I have been working on a script that does a similar thing, but there does not appear to be a method of adding a macro to an Excel spreadsheet using PowerShell. There
appears to be no way of calling VBProject.VBComponents.Add from within PowerShell.
I have tried manipulating the data that resides within Excel by directly accessing it from PowerShell, but this has proven to be painfully slow. What a macro can do in 3 seconds, takes PowerShell 8 hours to do :(
If it can't be done... then I'll have to revert back to my old ways. But if it can be done, great!!! PowerShell has alot more to offer me than VBScript did. -
Starting SMA runbook with parameteres using powershell via REST
Hello!
I am trying to start SMA runbook using powershell via REST. I can do that normally for simple runbook without parameters using REST web service (for example
https://my.server.com:9090/00000000-0000-0000-0000-000000000000/Runbooks%28guid%27bd55d199-c261-4c50-9cef-a83d5c976ce2%27%29/Start
However, I do not understand how to start a runbook which has parameters? For example I have 2 runbooks - 1 with single parameter and second with 3 parameters, how can I pass parameters value? I would really appreciate any help!Hello
Does this Link answer your question?
http://msdn.microsoft.com/en-us/library/hh921685.aspx
Thanks
Josh
Code from that URL in case the link ever dies:
# Details of the runbook we are going to run
$rbid = "00000000-0000-0000-00000000000000001"
$rbParameters = @{"00000000-0000-0000-00000000000000002" = "This is the value for Param1.";" 00000000-0000-0000-00000000000000003" = " This is the value for Param2."}
# Create the request object
$request = [System.Net.HttpWebRequest]::Create("http:// server01.contoso.com:81/Orchestrator2012/Orchestrator.svc/Jobs")
# Set the credentials to default or prompt for credentials
$request.UseDefaultCredentials = $true
# $request.Credentials = Get-Credential
# Build the request header
$request.Method = "POST"
$request.UserAgent = "Microsoft ADO.NET Data Services"
$request.Accept = "application/atom+xml,application/xml"
$request.ContentType = "application/atom+xml"
$request.KeepAlive = $true
$request.Headers.Add("Accept-Encoding","identity")
$request.Headers.Add("Accept-Language","en-US")
$request.Headers.Add("DataServiceVersion","1.0;NetFx")
$request.Headers.Add("MaxDataServiceVersion","2.0;NetFx")
$request.Headers.Add("Pragma","no-cache")
# If runbook servers are specified, format the string
$rbServerString = ""
if (-not [string]::IsNullOrEmpty($RunbookServers)) {
$rbServerString = -join ("<d:RunbookServers>",$RunbookServers,"</d:RunbookServers>")
# Format the Runbook parameters, if any
$rbParamString = ""
if ($rbParameters -ne $null) {
# Format the param string from the Parameters hashtable
$rbParamString = "<d:Parameters><![CDATA[<Data>"
foreach ($p in $rbParameters.GetEnumerator())
#$rbParamString = -join ($rbParamString,"<Parameter><ID>{",$p.key,"}</ID><Value>",$p.value,"</Value></Parameter>")
$rbParamString = -join ($rbParamString,"<Parameter><ID>{",$p.key,"}</ID><Value>",$p.value,"</Value></Parameter>")
$rbParamString += "</Data>]]></d:Parameters>"
# Build the request body
$requestBody = @"
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
<content type="application/xml">
<m:properties>
<d:RunbookId m:type="Edm.Guid">$rbid</d:RunbookId>
$rbserverstring
$rbparamstring
</m:properties>
</content>
</entry>
# Create a request stream from the request
$requestStream = new-object System.IO.StreamWriter $Request.GetRequestStream()
# Sends the request to the service
$requestStream.Write($RequestBody)
$requestStream.Flush()
$requestStream.Close()
# Get the response from the request
[System.Net.HttpWebResponse] $response = [System.Net.HttpWebResponse] $Request.GetResponse()
# Write the HttpWebResponse to String
$responseStream = $Response.GetResponseStream()
$readStream = new-object System.IO.StreamReader $responseStream
$responseString = $readStream.ReadToEnd()
# Close the streams
$readStream.Close()
$responseStream.Close()
# Get the ID of the resulting job
if ($response.StatusCode -eq 'Created')
$xmlDoc = [xml]$responseString
$jobId = $xmlDoc.entry.content.properties.Id.InnerText
Write-Host "Successfully started runbook. Job ID: " $jobId
else
Write-Host "Could not start runbook. Status: " $response.StatusCode -
Using Powershell Script Run simple query in MS Access 2007 and export the results of query to Excel
Hi Experts,
I have a Access 2007 DB file and 2 Big tables inside that (bigger than the size that can be easily handled by MS Excel 2007).
My requirement is automate using powershell scripts the below things.
1. Create a SQL query in Access DB and save that in access DB
2. Run the saved query and export the result in excel sheet where I can create the charts and Pivots. Thanks in advance
PrajeshDo you have to use the Access query, couldn't you just recreate the query in Powershell? Here's a link with good info that references an existing script for querying an Access database:
http://blogs.technet.com/b/heyscriptingguy/archive/2009/08/13/hey-scripting-guy-can-i-query-a-microsoft-access-database-with-a-windows-powershell-script.aspx
Once you have your dataset you can pipe it to
Export-Csv -NoType c:\pathtofile\output.csv -
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] -
not able to set security group without mail enabled as site collection admin using powershell in sharepoint online site - office 365?
Any idea?after few days test in my lab, I can see that only email enabled group can be added as site collection admin using POWERSHELL.
hope this helps who stuck like me!! :-) -
Changing a SQL Report server Database to a new One Using Powershell script
Hi,
I have an existing report server (Native Mode) and a pre-configured report server database. I have created a new database and want to assign it new report server database. How can i automate this process using powershell?
Here is the detail requirement
If there is a Report Server database seeded on the xxxxx server, follow the below steps:
◾Click the Database button on the left. Click on the Change Database button, choose option Choose an existing report server database. Enter the RPT server name (e.g. xxxxxx) in Server Name text box and click Next.
◾In the Report Server Database selection, select the ReportServer database. Then click next button to complete the process.
Any help in this regard will be very much helpfull.
Sushruta BanerjeeHi Sushruta,
To query export from Report server Database, the scripts below may be helpful for you:
Export RDL Files from ReportServer Database with PowerShell
SQL Database Reports with PowerShell
I hope this helps. -
Automation of SPLA Report using PowerShell
Hi,
I am reposting this question in this forum on the suggestion of an experienced exchange mvp, earlied posted in Exchange 2013 forum.
We want to automate SPLA report creation using PowerShell for Exchange 2010 and 2013, I mean
the report for Microsoft Service Providers License Agreement Program, which Service providers have to generate every month and have to submit to Microsoft.
Can somebody guide us, as we could not find any helpful online resource.
Thanks in anticipation.
Regards, David JohnsonThat reads like a hosting question to me, and hosters know best about that. If I were a moderator, I'd move this thread for you, but I'm not so I recommend you post in the Exchange for Hosters forum:
http://social.technet.microsoft.com/Forums/en-US/exchange2010hosters/threads
Ed Crowley MVP "There are seldom good technological solutions to behavioral problems." -
Creating a Scheduled Task using PowerShell v4
So here is my question. I'm trying/wanting to create a scheduled task using PowerShell v4 on Server 2012R2. I want to task to run on the 1st day of every month. The parameter for -Monthly -Day is not available. I need to use PowerShell
to create the Scheduled Task because the Task will be running with a group Managed Service Account credentials so the Scheduled Task can not be created via the Task Scheduler GUI.
Thanks in AdvanceHere is a functioning task It can be easily edited in PowerShell or in notepad to alter the timing
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.1" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Author>W8TEST\user01</Author>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2014-06-04T21:31:32.0459499</StartBoundary>
<Enabled>true</Enabled>
<ScheduleByMonth>
<DaysOfMonth>
<Day>1</Day>
<Day>12</Day>
<Day>24</Day>
</DaysOfMonth>
<Months>
<January />
<February />
<March />
<April />
<May />
<June />
<July />
<August /
<September />
<October />
<November />
<December />
</Months>
</ScheduleByMonth>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<RunLevel>LeastPrivilege</RunLevel>
<UserId>W8TEST\jvierra</UserId>
<LogonType>InteractiveToken</LogonType>
</Principal>
</Principals>
<Settings>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>P3D</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>notepad.exe</Command>
<Arguments>test.txt</Arguments>
<WorkingDirectory>c:\temp</WorkingDirectory>
</Exec>
</Actions>
</Task>
I have edited and reloaded the XML many, many times. It works very nicely.
¯\_(ツ)_/¯ -
Purchased a second iphone need to create an account, however the computer already has an itunes account for the first iphone...How do I create a second account using one copy of itunes on single computer??
Why do you need a new account?
Use the same account on both.
How to use multiple iPods, iPads, or iPhones with one computer -
I tried to update my iPhone 4S but I now keep getting an error saying I need to restore my phone before it can be used because it's in recovery mode! But if I restore it I lose all my media and data and I don't want to do that! Is there anything I can do?? Somone please help, i'm freaking out over here!
Anything that was on the phone is already gone. You have no choice but to restore. If you were backing up and syncing the phone on a regular basis, you should be able to restore your backup with minimal data loss.
Maybe you are looking for
-
How to Consum array returned by Stored Procedure through DB adapter in BPEL
Hi all, Requirement is, from BPEL through DB Adapter I need to invoke a Stored Procedure in Oracle. Stored procedure takes a String as Input and will returns as Table type object (will return multiple row for a given input) as output. When I try to c
-
Behaviour of TM toward and extHDD vs TC?
I remember recently backing up my system to an external HDD using Time Machine, it worked very differently comparred to experiences of the past. In the past I had access to a Time Capsule, so I never thought about it, that's what the technology is fo
-
How do i clear history in quick time
i need to clear all the history from quick time, preview and recents
-
CS3 Subselection Tool Shift Drag?
Is it just me or is it impossible to constrain the movement of points selected with the Subselection Tool by Shift-Drag? Properties window also does not show x and y for a collection of points selected with the the Subselection Tool and the same poin
-
Cant see the apps that i've downloaded
Cant see the apps that i've downloaded..what to do? Pls help.. Tnx