Tagged: dsc xsharepoint dscresource
- August 31, 2016 at 10:36 am #52668
Hi Using Server 2012R2 with WMF 5.
The LCM settings set to ApplyandAutocorrect and pull mode.
Is it possible to make sure a dscresource runs 1 time only. Even though the mof file reruns after restart to finish all configuration?
The custom resource I am talking about runs the SharePoint configuration Wizard (psconfig), which upgrades databases after installing specific SharePoint updates. I want each node to run psconfig once after joining the SharePoint farm.
Simply put I want the psconfig resource to run only if the joinfarm resource runs 'Set', which it will only do once, to join the farm.
I guess I could modify the xsharepoint joining resource to also run psconfig, but I'd rather not mess with Github resources that work great already.
Can I use the ApplyandMonitor setting in the LCM? Will this make the node finish its mof before monitoring? Though if this works, the problem is still that a change in the configuration and rerun of the mof will launch the psconfig again which I dont want.
Any suggestions or other steps to make this happen?
August 31, 2016 at 1:37 pm #52686
- This topic was modified 3 weeks, 6 days ago by Bjørn Roalkvam.
there is no way within dsc to say run this once. The proper way to do this would be to build a db schema check into the test function of the psconfig resource you wrote and when the schema is already on the correct version then return true.August 31, 2016 at 2:44 pm #52731
You must be logged in to reply to this topic.