Import Multiple CSVs to Tabs in One Excel Spreadsheet
article #763, updated 3796 days ago

From the excellent Jerry Beaucaire; VBA, for use inside an Excel module.

https://sites.google.com/a/madrocketscientist.com/jerrybeaucaires-excelassistant/merge-functions/csvs-to-sheets

Sub ImportCSVs()
'Author:    Jerry Beaucaire
'Date:      8/16/2010
'Summary:   Import all CSV files from a folder into separate sheets
'           named for the CSV filenames
'
'Update:    2/8/2013   Macro replaces existing sheets if they already exist in master workbook
'Modded:    12/10/14   Minor edits (Jonathan Brickman)

Dim fPath       As String
Dim fCSV        As String
Dim SheetName   As String
Dim wbCSV       As Workbook
Dim wbMST       As Workbook

Set wbMST = ThisWorkbook
fPath = "X:\PATH-TO-CSVs\"       'path to CSV files, include the final \
Application.ScreenUpdating = False  'speed up macro
Application.DisplayAlerts = False   'no error messages, take default answers
fCSV = Dir(fPath & "*.csv")         'start the CSV file listing

    On Error Resume Next
    Do While Len(fCSV) > 0
        SheetName = Left(fCSV, Len(fCSV) - 4)   ' Trim .CSV from filename, make sheet name
        Set wbCSV = Workbooks.Open(fPath & fCSV)                    'open a CSV file
        wbMST.Sheets(ActiveSheet.Name).Delete                       'avoid replication, delete sheet
        ActiveSheet.Move After:=wbMST.Sheets(wbMST.Sheets.Count)    'move new sheet into Mstr
        ActiveSheet.Name = SheetName
        Columns.AutoFit             		'clean up display
        fCSV = Dir                  		'ready next CSV
    Loop

Application.ScreenUpdating = True
Set wbCSV = Nothing
End Sub

Categories:      

==============

Export all Active Directory groups to CSV
article #762, updated 3798 days ago

From the amazing Farhan Kazi:

http://fkazi.blogspot.com/2013/07/export-active-directory-groups-with.html

@ECHO OFF
SETLOCAL EnableDelayedExpansion

SET FileName=Report.csv
SET AG=0
SET EG=0
SET CT=0
SET NE=0
SET GN=

FOR /F %%T IN ('DSQuery * -Filter "(&(objectClass=Group))" -Limit 0') DO SET /a AG+=1 >NUL
FOR /F %%T IN ('DSQuery * -Filter "(&(objectClass=Group)(^!member=*))" -Limit 0') DO SET /a EG+=1 >NUL
SET /a NE=!AG!-!EG!

ECHO Total Groups in Active Directory %AG% out of them %EG% are empty.&&ECHO.
ECHO Group,Members>"!FileName!"
TITLE Exporting !NE! Non-Empty AD Groups.

FOR /F "delims=" %%G IN ('DSQuery * -Filter "(&(objectClass=Group)(member=*))" -Limit 0') DO (
    FOR /F "delims=" %%v IN ('DSQuery * %%G -l -q -Attr Name -Limit 0') DO SET GN=%%v
    SET /a CT+=1 >NUL
    ECHO !CT!. Exporting: !GN!
    FOR /F "delims=" %%M IN ('DSGET Group %%G -Members') DO (
        FOR /F "delims=" %%U IN ('DSQuery * %%M -l -q -Attr displayName') DO (
        ECHO !GN!,%%U>>"!FileName!")))

TITLE Export complete.
ECHO.&&ECHO Export complete, please check '!FileName!' file.
EXIT /B 0

Here’s a mod, which creates one file per group:

REM
REM Export all Active Directory groups to CSV files
REM One CSV file per group
REM
REM Original written by Farhan Kazi
REM http://fkazi.blogspot.com/2013/07/export-active-directory-groups-with.html
REM
REM Modded for one file per group by Jonathan Brickman
REM http://n.ponderworthy.com
REM

@ECHO OFF
SETLOCAL EnableDelayedExpansion

SET AG=0
SET EG=0
SET CT=0
SET NE=0
SET GN=

FOR /F %%T IN ('DSQuery * -Filter "(&(objectClass=Group))" -Limit 0') DO SET /a AG+=1 >NUL
FOR /F %%T IN ('DSQuery * -Filter "(&(objectClass=Group)(^!member=*))" -Limit 0') DO SET /a EG+=1 >NUL
SET /a NE=!AG!-!EG!

ECHO Total Groups in Active Directory %AG% out of them %EG% are empty.&&ECHO.
TITLE Exporting !NE! Non-Empty AD Groups.

FOR /F "delims=" %%G IN ('DSQuery * -Filter "(&(objectClass=Group)(member=*))" -Limit 0') DO (
    FOR /F "delims=" %%v IN ('DSQuery * %%G -l -q -Attr Name -Limit 0') DO SET GN=%%v
    SET /a CT+=1 >NUL
    ECHO !CT!. Exporting: !GN!
    FOR /F "delims=" %%M IN ('DSGET Group %%G -Members') DO (
        FOR /F "delims=" %%U IN ('DSQuery * %%M -l -q -Attr displayName') DO (
        ECHO %%U>>"!GN!".CSV)))

TITLE Export complete.
ECHO.&&ECHO Export complete.
EXIT /B 0

Categories:      

==============

Download SQL Studio 2008 R2
article #761, updated 3799 days ago

Go to this page:

http://www.microsoft.com/en-us/download/details.aspx?id=30438

which looks like it is for SQL as a whole, check the downloads list; the ones you want are near the bottom.

Categories:      

==============

Download SQL Studio 2008
article #760, updated 3799 days ago

Go to this page:

http://www.microsoft.com/en-us/download/details.aspx?id=30438

which looks like it is for SQL as a whole, check the downloads list; the ones you want are near the bottom.

Categories:      

==============

Disable IPv6 through Group Policy
article #759, updated 3799 days ago

Something new from Microsoft:

http://social.technet.microsoft.com/wiki/contents/articles/5927.how-to-disable-ipv6-through-group-policy.aspx

Categories:      

==============

Installing Software on Terminal Servers
article #257, updated 3799 days ago

Terminal servers require special user modes, for software additions to work correctly, and sometimes, to happen at all.

Before installing anything on a terminal server, do this:

change user /install

And after the installation is complete, do this:

change user /execute

Categories:      

==============

X2Go remote control
article #758, updated 3802 days ago

It appears that FreeNX has begotten X2Go:

http://wiki.x2go.org/doku.php/start

Categories:      

==============

rc.local in Debian Jessie
article #757, updated 3803 days ago

A good start:

http://scotte.github.io/2014/03/systemd-is-in-the-trees/

Categories:      

==============

wget for Windows
article #63, updated 3807 days ago

Wget is an excellent command-line tool for retrieval of data from http or ftp servers. Its current most-up-to-date Windows version seems to be here:

https://eternallybored.org/misc/wget/

Categories:      

==============

Advanced Wireless Settings from the DD-WRT people
article #754, updated 3810 days ago

A great rundown:

http://www.dd-wrt.com/wiki/index.php/Atheros/ath_wireless_settings

Categories: