Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: ###Add to Domain
- ::FJoinOptions=1 - ComputerName must be in AD - OU can be broad
- ::FJoinOptions=3 - ComputerName doesn't have to be in AD - Places ComputerName in the OU described.
- ::wmic.exe /interactive:off ComputerSystem Where name="%computername%" call JoinDomainOrWorkgroup FJoinOptions=1 Name="matt.edu" UserName="matt\Matt" Password="Password" AccountOU="OU=test;DC=matt;DC=edu"
- ::wmic.exe /interactive:off ComputerSystem Where name="%computername%" call JoinDomainOrWorkgroup FJoinOptions=3 Name="matt.edu" UserName="matt\Matt" Password="Password" AccountOU="OU=test;DC=matt;DC=edu"
- :: ###Remove from Domain and add to workgroup specified
- ::wmic.exe /interactive:off ComputerSystem Where "Name='%computername%'" Call UnJoinDomainOrWorkgroup FUnjoinOptions=0
- ::wmic.exe /interactive:off ComputerSystem Where "Name='%computername%'" Call JoinDomainOrWorkgroup name="WORKGROUP"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement