The PowerShell comment character is #. Care must be taken when using it with Perforce as a revision specifier. This command
PS D:\workspaces> p4 sync #0
Would be interpreted as:
PS D:\workspaces> p4 sync
That is, everything starting with # would be interpreted as a comment and ignored. You could use any of the following to achieve the desired result.
PS D:\workspaces> p4 sync "#0" PS D:\workspaces> p4 sync '#0' PS D:\workspaces> p4 sync `#0
The # character is not interpreted as a comment character when embedded in a string. For example,
PS D:\workspaces> p4 sync myfile#0
would be interpreted literally. The # is not interpreted as a comment character because it is embedded in a string.