Quantcast
Channel: SQLServerCentral » Programming » Powershell » Latest topics
Browsing all 467 articles
Browse latest View live

WMI connection error using Invoke-Sqlcmd

Hi all,I'm brand new to powershell and am trying to convert an old batch script that run some sql files via sqlcmd command to a powershell script.This is my test script so far:[code la

View Article


Run New PowerShell Process As A Different User

Hello,I'm trying to create a PowerShell script that will run a new PowerShell Process as a different 'Windows' user.  The following code seems to work for running the new process as the different user,...

View Article


List edition and version of all SQL Server machines over the Network ...

In our organization, we have more than 100 SQL Server machines on different regions over the Network/LAN/WAN. We have restricted the network to do not go out of subnet/your allowed access until...

View Article

Help with List Variable

Hi, Please could anyone help me with following requirement. I have output like below -

View Article

Get Max Number of error log files

Creating Audit script to validate newly built sql server- as it's popular now- in PS. Do not have much experience with PS- learning on the fly- moving slowly but steadily. Stuck with validating Max N...

View Article


skip function if completed successfully

I have a function where I'm executing in succession a list of sql queries\updates. The function has try\catch so if it detects error. My questionis( hopefully asking correctly) is there a way if one...

View Article

change the credentials for SQL Server Agent on all the nodes of a cluster

I'm running into a problem on a simple powershell script to change the credentials for SQL Server Agent on all the nodes of a cluster. Something is going wrong when I pass values to the...

View Article
Browsing all 467 articles
Browse latest View live