Home Forums Programming Powershell How to exclude replication stored procedures from a script? RE: How to exclude replication stored procedures from a script?

  • 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}

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato