You have got observed my earlier article about the way to Disabling Self-Provider Acquire choices.
I’m tempted to write down this weblog as we got here throughout state of affairs the place we wish to automate it and no longer checking on each few weeks after which disabling the goods.
On first glance it looked to be easy, however factor is MSCommerce module does no longer have any approach to move PS Credentials.
We have now changed the module and embedded within the script resolution zip. (Reference: Offering scripted credentials or PSSession credentials for Attach-MSCommerce · Factor #799 · MicrosoftDocs/microsoft-365-docs (github.com) )
Obtain the answer from under git hub hyperlink:
Listed here are the recordsdata after extraction:
vsadmin module is needed ahead of continuing additional.
Replace the batch report as proven right here:
Run it manually ones by way of double clicking the batch report, will auto generate encrypted password first time it’s run and reserve it in the similar folder.
After that it may be scheduled by means of job scheduler.
Earlier than working the script, you’ll be able to take a look at the standing of goods(observe for main points – Disable Self-Provider Acquire possibility Place of business 365 Merchandise | Tech Wizard)
Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase
After Script is administered, it’ll disable the goods which can be set as Enabled and also will record in CSV this is stored in record folder.
Here’s the Process Scheduler Settings:
Process Scheduler Settings that you just will have to no longer overlook is Get started in (non-compulsory): will have to be populated with the listing from which script is working.
If you wish to automate the Disable of self-service acquire choices, then you’re on proper weblog publish .
Simply obtain and agenda this script resolution.
Thank you for studying and downloading…