I need to programmatically or via Powershell or TSQL stop and start a replication transactional snapshot agent after changing a publication configuration.
Config change below:-
USE [POS]
EXEC sp_changepublication
@publication = N'IN_STORE',
@property = N'snapshot_in_defaultfolder',
@value = N'false'
GO
EXEC sp_changepublication
@publication = N'IN_STORE',
@property = N'alt_snapshot_folder',
@value = N'C:\Program Files\POS\SqlSnapshots'
GO