Code:
menu * {
  Minimize All windows on $network : F10
  Restore All windows on $network : F11
  Minimize All windows on all networks : sF10
  Restore All windows on all networks : sF11
}
alias F10 {
  var %a = 1, %b = $window(*,0)
  while %a <= %b {
    window -n $qt($window(*,%a))
    inc %a
  }
}
alias sF10 scon -at1 F10
alias F11 {
  var %a = 1, %b = $window(*,0)
  while %a <= %b {
    window -r $qt($window(*,%a))
    inc %a
  }
}
alias sF11 scon -at1 F11


Try that instead. Alias names in remotes require the 'alias' keyword infront of them.