[p4] Convert Windows SDP to Powershell (from .bat files) - or Python??

Robert Cowham perforce-user-forum at forums.perforce.com
Thu Aug 18 02:30:01 PDT 2016


Posted on behalf of forum user 'Robert Cowham'.

Question for Windows P4 Admins - do you use SDP, and if so do you care about
technology it is written in?

What do you use to administer your Windows machines?

https://swarm.workshop.perforce.com/projects/perforce-software-sdp/

At the moment, the Windows version is written in .bat scripts.

Issues:
- error handling is hard in .bat
- duplicated code amongst scripts makes updates hard
- Windows SDP is way behind Unix SDP in terms of functionality due to how hard
it is to do similar things

So as an exercise, I have rewritten one of the scripts in Powershell:

https://swarm.workshop.perforce.com/projects/perforce-software-sdp/files/dev/Server/Windows/p4/common/bin/daily-backup.ps1
and
https://swarm.workshop.perforce.com/projects/perforce-software-sdp/files/dev/Server/Windows/p4/common/bin/SDP-functions.ps1

Is this a worthwhile exercise? Does anyone care?!

The idea of keeping the scripts open is to make them easily customisable by
admins. In practice it is unclear how much this happens. Python has been
proposed as an alternative, but there are no current plans to convert current
Unix scripts to Python.

Thoughts?

- Robert



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/4908-convert-windows-sdp-to-powershell-from-bat-files-or-python


More information about the perforce-user mailing list