I have just finished Learn Windows Powershell 2 in a month of lunches....
I am using this script:
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?