runPowershell function
Implementation
Future<String?> runPowershell(String command) async {
final result = await Process.run('powershell', [
'-NoProfile',
'-ExecutionPolicy',
'Bypass',
'-Command',
command,
]);
if (result.exitCode == 0) {
return null;
}
return result.stderr;
}