Search found 99 matches

by EBrant
Tue Feb 19, 2013 12:07 am
Forum: Windows PowerShell
Topic: Cannot load type from command line or script or ISE but can from PowerGUI script editor
Replies: 6
Views: 2748

Cannot load type from command line or script or ISE but can from PowerGUI script editor

I confirmed it is definately note loading i.e. [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') [appdomain]::currentdomain.getassemblies() | select fullname Shows the new Assembly loaded as one would expect, where as [System.Reflection.Assembly]::LoadWithPartialName('System...
by EBrant
Mon Feb 18, 2013 10:58 pm
Forum: Windows PowerShell
Topic: Cannot load type from command line or script or ISE but can from PowerGUI script editor
Replies: 6
Views: 2748

Cannot load type from command line or script or ISE but can from PowerGUI script editor

Interestingly when I do the following from the PowerGUI editor cls Add-Type -path C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.IO.Compression.FileSystemv4.0_4.0.0.0__b77a5c561934e089System.IO.Compression.FileSystem.dll I receive no errors, when I do the above from the Powershell prompt or ISE I rece...
by EBrant
Mon Feb 18, 2013 10:02 pm
Forum: Windows PowerShell
Topic: Cannot load type from command line or script or ISE but can from PowerGUI script editor
Replies: 6
Views: 2748

Cannot load type from command line or script or ISE but can from PowerGUI script editor

Hello, Can someone please help me with the following question. I have .NET 4.5 installed From PowerGUI if I do [System.Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') [IO.Compression.ZipFile] Works as expected (i.e. can create zip files) However if I do the above from t...
by EBrant
Thu Feb 14, 2013 6:52 am
Forum: Windows PowerShell
Topic: Loading and using .NETAssembiles and Classes
Replies: 6
Views: 2760

Loading and using .NETAssembiles and Classes

Thanks again Jim

Ernie
by EBrant
Wed Feb 13, 2013 7:54 pm
Forum: Windows PowerShell
Topic: Loading and using .NETAssembiles and Classes
Replies: 6
Views: 2760

Loading and using .NETAssembiles and Classes

Thanks again Jim, Do you happen to know of any good reading material on this particular subject (i.e. Blog or book etc) I get the basic idea, but not being from a programming or scripting back ground I am playing catch up. For example whats the Reflection namespace all about. My understanding is an ...
by EBrant
Wed Feb 13, 2013 8:05 am
Forum: Windows PowerShell
Topic: Loading and using .NETAssembiles and Classes
Replies: 6
Views: 2760

Loading and using .NETAssembiles and Classes

I figured it out I should be using the [IO.Compression.ZipFile] | gm -Static | select name although it is a little confusing to a new commer as ZipFile appears to derive from System.IO.Compression (which from what I have read was alreay availabile in earlier version of .net) rather than deriving fro...
by EBrant
Wed Feb 13, 2013 7:42 am
Forum: Windows PowerShell
Topic: Loading and using .NETAssembiles and Classes
Replies: 6
Views: 2760

Loading and using .NETAssembiles and Classes

Hello All I want to start using the new compression features in the .NET 4.5 class 'System.IO.Compression.FileSystem' As I want to zip/unzip files etc and do not want to use any third party modules or libraries etc. I am using Windows 7, Powershell 2.0 and Installed .NET 4.5 Next # first I added the...
by EBrant
Sat Feb 09, 2013 9:23 pm
Forum: Windows PowerShell
Topic: Adding user input/output forms to scripts
Replies: 5
Views: 1969

Adding user input/output forms to scripts

Thanks very much again Jim, I will check out PowerShell Studio. After doing some more searching I also came across WPK from the Windows PowerShell Pack (part of the Windows 7 resource kit) looks similar to ShowUI (unless it is the same thing renamed) So think I am going to take a look at this too, a...
by EBrant
Sat Feb 09, 2013 8:03 am
Forum: Windows PowerShell
Topic: Adding user input/output forms to scripts
Replies: 5
Views: 1969

Adding user input/output forms to scripts

Hello, At the moment I am using basic techniques like read-host and out-gridview for basic user input and output. I now want to start learning how to take this to the next level, and looking to the future WPF (Windows Presentation Foundation) appears to be the way to go over Windows Forms. There are...
by EBrant
Tue Feb 05, 2013 9:16 am
Forum: Windows PowerShell
Topic: DateTime question.
Replies: 3
Views: 1281

DateTime question.

Thanks very much Jim for this comprehensive answer with some good examples :)

Ernie