| Comment | SQLServer Stored Procedure
PURPOSE
List properties of the Networkadapter Configuration on the local computer.
Field list:
- InterfaceIndex INT NOT NULL (PK)
- 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 Windows temp folder
- Run the Powershell script (with xp_cmdshell) and output results to csv-file to Windows temp folder
- Use BULK INSERT to load the csv-file into a temp table
- Select results from the temp table
EXAMPLES
EXEC [dbo].[prc_ps_networkadaptercfg];
USED OBJECTS
- xp_cmdshell (extended stored procedure) (*)
- 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) (**)
- dbo.fun_TempFolder (UDF in local database) (**)
(*) - Needs config parameter 'xp_cmdshell' = 1
(**) - Needs config parameter 'Ole Automation Procedures' = 1
HISTORY
2026-01-24 - Created procedure
2026-03-07 - Use UDF dbo.fun_TempFolder to get Windows temp folder
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-03-07</lastmodified>
</program> |