This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo pip install --upgrade -force-reinstall `pip freeze --local | tr '\n' ' ' | sed 's/==[0-9,.]* / /g'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static ManagementObject GetObject(ManagementScope scope, string serviceName) | |
{ | |
return GetObjects(scope, serviceName).FirstOrDefault(); | |
} | |
public static IEnumerable<ManagementObject> GetObjects(ManagementScope scope, string serviceName) | |
{ | |
return new ManagementClass(scope, new ManagementPath(serviceName), null) | |
.GetInstances() | |
.OfType<ManagementObject>(); |