< Back

Compare-Services

Mon Jan 13, 2020 4:10 am

NAME Compare-Services



SYNOPSIS

The Compare-Services function allows you to compare two computer configurations using two CSV or XML files.

It works like this: Compare-Services -Path C:\\ -file1 <File1_Path> -file2 <File2_Path> -CSV or -XLS





SYNTAX

Compare-Services [-Path] <String> -File1 <String> -File2 <String> [-XLS] [-HTML] [<CommonParameters>]





DESCRIPTION

Allow you to compare two computer configurations by comparing twi CSV or XML files.

These CSV or XML files have to contain bith services export with Name, Caption, State and Startmode columns

They could be generated easily using the ConfigExport module

Comparison can be done in two formats: HTML or XLSX





PARAMETERS

-Path <String>



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-File1 <String>



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-File2 <String>



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-XLS [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-HTML [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Author: Damien VAN ROBAEYS - @syst_and_deploy - http://www.systanddeploy.com



-------------------------- EXAMPLE 1 --------------------------



PS Root\\>Compare-Services -Path C:\\ -file1 c:\\Services1.csv -file2 c:\\Services2.csv -HTML



The command above will compare both Services1.csv and Services2.csv files.

It will create a file Compare_Services.html file in C:









-------------------------- EXAMPLE 2 --------------------------



PS Root\\>Compare-Services -Path C:\\ -file1 c:\\Services1.csv -file2 c:\\Services2.csv -XLS



The command above will compare both Services1.csv and Services2.csv files.

It will create a file Compare_Services.xlsx file in C:











RELATED LINKS