Switching High-voltages with p-channel MOSFET
Mosfet Vgs max is typically +-20V (check the spec-sheet of your chosen device) so you need some intermediate circuit so you only pull the gate below your rail by less than 20V

For low frequency switching applications, something like this is typical.







simulate this circuit &ndash; Schematic created using CircuitLab

Set the values of R1 and R2 to voltage divide your supply to set the right Vgs voltage on M1 when Q1 is on. Set R3 so there is enough current in that divider when your logic level is high.

For high voltages you will be using fairly high values for R1 and R2 to keep the current and power levels reasonable. That means the switch will not be very fast. If you want this for a PWM application you will need a more active driver.