text
stringlengths
0
4.23k
Syntax
goto <label>
Parameters
Parameter
Description
<label>
Specifies a text string that is used as a label in the batch program.
/?
Displays help at the command prompt.
<label>
Remarks
If command extensions are enabled (the default), and you use the goto command with a target label of :EOF, you transfer control to the end of the current batch script file and exit the batch script file without defining a label. When you use this command with the :EOF label, you must insert a colon before the label. Fo...
goto:EOF
You can use spaces in the label parameter, but you can't include other separators (for example, semicolons (;) or equal signs (=)).
The label value that you specify must match a label in the batch program. The label within the batch program must begin with a colon (:). If a line begins with a colon, it's treated as a label and any commands on that line are ignored. If your batch program doesn't contain the label that you specify in the label parame...
Label not found
You can use goto with other commands to perform conditional operations. For more information about using goto for conditional operations, see the if command.
Examples
The following batch program formats a disk in drive A as a system disk. If the operation is successful, the goto command directs processing to the :end label:
echo off
format a: /s
if not errorlevel 1 goto end
echo An error occurred during formatting.
:end
echo End of batch program.
gpfixup
Fixes domain name dependencies in Group Policy Objects and Group Policy links after a domain rename operation. To use this command, you must install Group Policy Management as a feature through Server Manager.
Syntax
gpfixup [/v]
[/olddns:<olddnsname> /newdns:<newdnsname>]
[/oldnb:<oldflatname> /newnb:<newflatname>]
[/dc:<dcname>] [/sionly]
[/user:<username> [/pwd:{<password>|*}]] [/?]
Parameters
Parameter
Description
/v
Displays detailed status messages. If this parameter isn't used, only error messages or a summary status message stating, SUCCESS or FAILURE appears.
/olddns:<olddnsname>
Specifies the old DNS name of the renamed domain as <olddnsname> when the domain rename operation changes the DNS name of a domain. You can use this parameter only if you also use the /newdns parameter to specify a new domain DNS name.
/newdns:<newdnsname>
Specifies the new DNS name of the renamed domain as <newdnsname> when the domain rename operation changes the DNS name of a domain. You can use this parameter only if you also use the /olddns parameter to specify the old domain DNS name.
/oldnb:<oldflatname>
Specifies the old NetBIOS name of the renamed domain as <oldflatname> when the domain rename operation changes the NetBIOS name of a domain. You can use this parameter only if you use the /newnb parameter to specify a new domain NetBIOS name.
/newnb:<newflatname>
Specifies the new NetBIOS name of the renamed domain as <newflatname> when the domain rename operation changes the NetBIOS name of a domain. You can use this parameter only if you use the /oldnb parameter to specify the old domain NetBIOS name.
/dc:<dcname>
Connect to the domain controller named <dcname> (a DNS name or a NetBIOS name). <dcname> must host a writable replica of the domain directory partition as indicated by one of the following:The DNS name <newdnsname> by using /newdnsThe NetBIOS name <newflatname> by using /newnbIf this parameter isn't used, you can conne...
/sionly
Performs only the Group Policy fix that relates to managed software installation (the Software Installation extension for Group Policy). Skip the actions that fix Group Policy links and the SYSVOL paths in GPOs.
/user:<username>
Runs this command in the security context of the user <username>, where <username> is in the format domain\user. If this parameter isn't used, this command runs as the logged in user.
/pwd:{<password> | *}
Specifies the password for the user.
/?
Displays Help at the command prompt.
<olddnsname>
<olddnsname>
<newdnsname>
<newdnsname>
<oldflatname>
<oldflatname>