Whenever I make a modification to a structure I have created I have to exit from the session before the changes take place. Is there an better way to do this?
Add-Type @"
public struct Computer {
public string Name;
public string ProductName;
public string InstallDate;
public string LastBootTime;
public string ServicePack;
public string ProductVersion;
public string OSArchitecture;
public string Manufacturer;
public string Model;
public string Memory;
}
"@
It’s a .NET restriction.
For what I kwow, ona assembly loaded in an
appDomaincan’t be unloaded.That’s why you have to close powershell console and restart a nes session.