Roust_m (6/26/2012)
opc.three (6/25/2012)
opc.three (6/25/2012)
Try it with -Name, like this:
Get-ChildItem -Name -Exclude dbo.sp_MS*
😛 and then I remembered the initial intent...
Try this one:
Get-ChildItem | Where-Object {$_.name -NotLike "sp_MS"} | %{$_.Script($so) + " GO " | Out-File "Z:\MyDB\08_SPs $timestamp.sql" -Append}
Doesn't work either. I am still getting the replication SPs in the list. Should I put some sort of wildcard character into the like statement?
Yes, you would have to say sp_MS*.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato