Gerrit Mantel
Programs SQL_STORED_PROCEDURE - prc_ps_networkadaptercfg

Main program

Nameprc_ps_networkadaptercfg
Type_descSQL_STORED_PROCEDURE
CommentSQLServer Stored Procedure

PURPOSE
List properties of the Networkadapter Configuration on the local computer.

Field list:
- InterfaceIndex INT NOT NULL (PK)
- Info_date DATETIME NULL
- DHCPEnabled VARCHAR(5) NULL
- IPAddress VARCHAR(512) NULL
- IPSubnet VARCHAR(512) NULL
- DefaultIPGateway VARCHAR(512) NULL
- DNSServerSearchOrder VARCHAR(512) NULL
- DNSDomainSuffixSearchOrder VARCHAR(512) NULL
- FullDNSRegistrationEnabled VARCHAR(5) NULL
- WINSEnableLMHostsLookup VARCHAR(5) NULL
- TcpipNetbiosOptions VARCHAR(5) NULL

This procedure uses the following method:
- Create Powershell script on given dump_path
- Run the Powershell script (with xp_cmdshell) and output results to csv-file to given dump_path
- Use BULK INSERT to load the csv-file into a temp table
- Select results from the temp table (including systemdate as Info_date)

PARAMETERS
1 @dump_path VARCHAR(255) = Path to dump scriptfile (ps1) and datafile (csv) to.

EXAMPLES
EXEC [dbo].[prc_ps_networkadaptercfg] @dump_path = 'C:\Data\Temp';

USED OBJECTS
- xp_cmdshell (extended stored procedure, needs config parameter xp_cmdshell=1)
- powershell (external program)
- dbo.prc_save_text_to_file (SP in local database)
- dbo.fun_FolderExist (UDF in local database)
- dbo.fun_DeleteFile (UDF in local database)
- dbo.fun_FileExist (UDF in local database)

HISTORY
2026-01-24 - Created procedure

TAGS
<program>
<description>List properties of the Networkadapter Configuration on the local computer</description>
<generic>1</generic>
<author>Gerrit Mantel</author>
<created>2026-01-24</created>
<lastmodified>2026-01-24</lastmodified>
</program>
DescriptionList properties of the Networkadapter Configuration on the local computer
Minversion
Generic1
AuthorGerrit Mantel
Created2026-01-24 00:00:00
Lastmodified2026-01-24 00:00:00
Xp_cmdshell1
Ole_automation0
Subprogram_cnt4
Sourcecode

Sub programs

NameType descDescriptionMinversionGenericAuthorCreatedLastmodifiedXp cmdshellOle automation
fun_DeleteFileSQL_SCALAR_FUNCTIONDelete given file(s)1Gerrit Mantel2017-10-10 00:00:002026-01-23 00:00:0001
fun_FileExistSQL_SCALAR_FUNCTIONCheck if file exists1Gerrit Mantel2015-11-24 00:00:002026-01-23 00:00:0001
fun_FolderExistSQL_SCALAR_FUNCTIONCheck if folder exists1Gerrit Mantel2015-11-24 00:00:002026-01-23 00:00:0001
prc_save_text_to_fileSQL_STORED_PROCEDUREWrite text variable to ansi file1Gerrit Mantel2017-01-25 00:00:002025-06-06 00:00:0001