Using the commands below, I was able to successfully script a join to a workgroup.
wmic.exe /interactive:off ComputerSystem Where “Name=’%computername%’” Call UnJoinDomainOrWorkgroup FUnjoinOptions=0
wmic.exe /interactive:off ComputerSystem Where “Name=’%computername%’” Call JoinDomainOrWorkgroup name=”Azure”
tags: MrNetTek