These cmdlets are available in the ScheduledTasks module.
It was introduced in Windows 8 and Server 2012 with PS v3.
If you're using an older environment, you could use the Schedule.Service COM object.
See for example PowerShell – Managing Scheduled Tasks
On the credentials, you could also use the New-VICredentialStoreItem
Just make sure the scheduled task runs under the same account and on the same computer where you created the CredentialStoreItem.
Which is in fact the same limitation the solution you pointed to has.