@Vinod Survase,Thanks for posting in Q&A.
From you description, I know that you want to deploy local admin account via Intune and remove it after work.
Based on my testing, you can deploy local admin account via PowerShell in Intune and here are the contents of script:
$Password = ConvertTo-SecureString "Password01!" -AsPlainText -Force
New-LocalUser "newadmin" -Password $Password -FullName "new admin" -Description "Temporary local admin"
Add-LocalGroupMember -Group "Administrators" -Member "newadmin"
You should first create a .ps1 file and manually run the script on device with admin account, if it works, you can upload the script into Intune. Location: Intune Admin center > Devices > Scripts > Add Windows 10 and later.
Moreover, if you want to remove the local admin account after it work, you can try the script below and please do the same as the deployment of the above script.
Remove-LocalUser -Name "local admin account"
Hope this can be helpful, if there is any update, feel free to contact me.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.