Quantcast
Browsing all 467 articles
Browse latest View live

Powershell and remote registry

I'm running into an issue where I can't access the following registry key remotely, either via Powershell or xp_regread. I can see it in Regedit or with powershell when I'm logged onto the box. This...

View Article


Need help with script - powershell and sql agent job

Hi All,I am writing this script to check if the sql agent job is running or not and if it is not running disable it.Some how I am not able to disable it and it is not evaluating the if loop. I am...

View Article


Calling a powershell script from TSQL

Does anyone know if this is possible?

View Article

Silly newbie question

Hello,I am just starting to work with PowerShell, and have the most basic problem that I am sure is due to my misunderstanding something very fundamental. Let's say I create a simple, 1-line script...

View Article

Querying group names containing dollar signs with WMI

I'm using Powershell (v2.0) to get the members of local groups on remote servers. I've got that working with the get-wmiobject cmdlet with one strange exception: If a local groupname contains a $, that...

View Article


RegEx Replace question

I am having a problem in gettin this regex statemnent to work.if (a.FullPath.StartsWith("Q:")) monitoringpath = "\\\\eldorado\sasknowledge\\Programs\\Data Distribution\\CollectionPoint"; FullPath2 =...

View Article

Change SQL Server Licenses with Powershell

We need to downgrade a lot of our SQL Server licenses from Enterprise to Development. Is there a way to do this with Powershell since we have so many machines to go against.

View Article

known bug with no fix??

Basic issue: after loading sqlps module network share is not accessible...Bug is already logged but not yet acknowledged by...

View Article


Powershell Restore Script

Hi folksI'm trying to adapt the powershell script at [url=http://sysadmingrunt.blogspot.com/][/url] into my own environmentThe modifications I made to the original code was to pass a *.sqb in the end...

View Article


Vbscript SQL and fOREFRONT TMG Help !!

Hello, I’m having problems when debugging the database as it grows and grows TMG and the idea is to use a script to delete old records. I’m ussing remote SQL logging. I make this two script but seems...

View Article

Get-WmiObject : Invalid class for SQLServiceAdvancedProperty

Greetings! I have a command(below) in a powershell script that has been working for well over a year, but started failing about 4 days ago. I'm at a beginner level with powershell so it's not clear to...

View Article

TrimEnd

Can someone please explain why ccra and project (lines 1 and 3) return ccr and projec, respectively, while the other two examples return what I would expect, ccrb and...

View Article

How to work with CMD prompt and prompt selections

I have an executable that when ran opens a cmd windows, gives some information, and then prompts for a selection at the prompt as show below:"Would you like to proceed? [Y\N]"I am trying to figure out...

View Article


SQL Agent Powershell - Remote permissions

My first attempt to use Powershell is proving frustrating:I have a SQL 2008R2 server and two other Win 2003 servers sitting outside the domain. I need to sync a directory between the two 2003 boxes,...

View Article

How to exclude replication stored procedures from a script?

Hi,I am using the below powershell code to genarate a script for all the SPs in a database. Is there any way to change it so it does not script replication SPs, which start with either sp_MSdel_dbo,...

View Article


Set-based Insert from PoSh to SQL table

Hi all,I've been trying to find a way to do set-based inserts into a SQL Server.As near as I can tell, there are only 2 ways:1) convert the data to be inserted to XML, pass that SQL Server, either a...

View Article

PowerShell - Get Permissions

Hello,I am new to Powershell and I have been asked to get the SQL Server Database data path and insert this veriable into a script to gather permissions from the folders and inserts them into a csv...

View Article


Powershell and Administration

At PASS Summit 08, I was introduced to Powershell, and I was pretty excited about using it to track information about some of the SQL servers at my company. I'm aspiring to become a DBA, but I'm a...

View Article

Split escaped characters

My network admins, in their wisdom, created admin accounts for us developers for those time when we simply must have some privileges.As you can see, my CN appears to be based on my DisplayName...

View Article

Use Powershell to delete a logon trigger that has locked down a DB?

Hi,Is it possible to use Powershell to delete a logon trigger that has locked down a DB?Thanks, Phil

View Article
Browsing all 467 articles
Browse latest View live