Error in Downloading Report from Local SSRS Server
I am executing this attached code "SampleScript.ps1" to access my SSRS report in my local server and download the report in pdf format in local drive. The error which I am getting is as follows,...
View ArticleQuery local SSMS server group with Powershell?
This may be a totally off the wall question, but it seems like it should be possible to do. Just can't find any specifics as to how I might accomplish it. I have a situation in that I have the same...
View Articleplease help me to send mail to all as below script output
$ServerList = Get-Content "D:\ServerList.txt" $OutputFile = "D:\Output.htm" $HTML = '<style type="text/css"> #Header{font-family:"Trebuchet MS", Arial, Helvetica,...
View ArticlePowershell script for SSIS 2012 build and deployment
HI All, I need Powershell script sample for Build and Deployment of SSIS 2012 packages . we are using SSISDB. If possible, please provide sample ssis solution and powershell scripts so I will able to...
View ArticleExtract output from central management servers into a table
This one has my head spinning. I would like to run a query on all of the servers registered in the central management server and then write the output to a table on our management server. I can get the...
View ArticleIs there a way to check stored procs affected by change to a view?
I'm trying to see which stored procs (and functions) might be affected by my having added a column to a view definition, which might cause ambiguity errors. Is there a way to do this without a manual...
View ArticleExport Large Tables To CSV Slow
Hi there I have written a PS script to export a batch of tables listed in a .txt file to CSV: $server = "XXX" $database = "XXX" $TableFile = XXX.txt' #Delcare Connection Variables $connectionTemplate =...
View Articlehow connect to sql server as different user using powershell ?
Example $instanceName ="Host001\Server1,14002" $AppName = "$($ENV:computername.ToString())_$(($MyInvocation.MyCommand).Path)" $conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection...
View ArticleNeed help to get Disk I/O of all disks in a server
Hello Friends, Can someone please give me the command to get me the Disk name and Disk I/O on a windows 2012 server using powershell
View ArticleEasy piece of code just doesnt bloody work.
Sounds like a headline from the onion. All I want to do is add a new database role to a database and its not working. I understand the error, but I don't know why I'm getting it. It (the code) matches...
View ArticleGot what I need, but perhaps a more elegant solution is out there. Looping...
Hey PoSh experts, So I need to get the max size setting of all SQL databases in the primary filegroup, excluding the system databases and the tempdb. I was told I'll have to loop through the DB's to...
View ArticleExport Output/Log Info to .CSV
[size="2"]Right now, the output of my script looks this:[/size] [size="1"]Microsoft (R) SQL Server Execute Package Utility Version 11.0.6020.0 for 32-bit Copyright (C) Microsoft Corporation. All rights...
View ArticleAutoalert if SQLAgent stops
I have this piece of powershell code which sends out an email when executed in a SQL job or run in powershell mode but does not work in this below situation. Attached is a screenshot of the Recovery...
View ArticleInvoke-ASCMD - Passing values to the XMLA file not working
I need to create a cmd file to backup Analysis Service Database. Because my SQL Server 2014 does not have ascmd.exe, I thought I would use powershell 'Invoke-ASCMD' but I am having problems passing...
View ArticleEdit the Directory physical path Location for Applications Under Default Website
Hi, I'm currently looking for a way to amend applications physical paths through power-shell instead of manually going into every application. I have a number of applications under the default website...
View Articlerun sql server unattended setup on remote host using powershell
running Enter-PSSession -ComputerName MyServer001 -Credential pricing\dba connected at [MyServer001]: PS C:\Users\dba\Documents> "for clear post I placed setup params on separate line, in my call...
View ArticleComplete One Invoke-ASCMD Successfully Before the Next
I am working on a PowerShell script that uses Invoke-ASCMD to run XMLA scripts. In some cases, I have multiple XMLA scripts that need to run. How can I make sure each Invoke-ASCMD/XMLA script runs...
View ArticleCalling a Stored Procedure with Output Parameters
I have another PowerShell newbie question. I want to run a stored procedure from a PowerShell script and receive the resulting output parameter values. So basically, I would like to run the equivalent...
View ArticleFile not found error when calling CreateTextFile
Hi, Wondering if anyone has any ideas what might be happening here. I've set up a SQL Server Agent Job that has a Powershell step in it. The job keeps failing when it tries to execute the Powershell...
View ArticleErrors while trying to copy files to UNC path using Powershell
Hello experts, I found the promising script below at the following link:...
View Article