Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

Can't load a script

$
0
0

I have just finished Learn Windows Powershell 2 in a month of lunches....

I am using this script:

http://blogs.technet.com/b/sqlthoughts/archive/2008/10/03/out-sql-powershell-function-export-pipeline-to-a-new-sql-server-table.aspx?wa=wsignin1.0&CommentPosted=true#commentmessage

and have written this:

$Data=Get-DhcpServerv4Lease -ScopeId 0.0.0.0 -ComputerName dhcp-ed
$connection = Server=dashboard;Database=NetworkInventory;Trusted_Connection=True;"
$Data | out-sql -sqlserver "dashboard" -database "networkinventory" -table "dhcp3" -dropexisting $true

The three lines above work perfectly, however, I need the script to load the out-sql.ps1 file prior to the $data line.  I have tried adding the fullpath to the script just above the $dfata line and it does not run.  What am I doing wrong?


Viewing all articles
Browse latest Browse all 8411

Latest Images

Trending Articles



Latest Images