Skip to content

Tag: MicrosoftConnect

PowerShell 0

[Bug] PowerShell Scripts in ScriptsToProcess attribute appear as loaded modules

Microsoft PowerShell module manifests allow you to define scripts that are run prior to actual loading of the module itself. These scripts run in the caller’s scope (and not in the module’s scope) and can be defined by stating them in the ‘ScriptsToProcess’ attribute of the manifest. However, each of these scripts will appear as if they have been loaded […]

PowerShell 0

[Bug] Start-Job from Scheduled Task fails with event id 8197 when invoked via different Credential Set

[UPDATE 2014-10-21] the code and the assembly are now available under Apache 2.0 license on GitHub at https://github.com/dfch/biz.dfch.CS.System.Utilities [UPDATE 2014-12-10] see below for further details on this issue and a workaround to this that does not need PSRemoting Recently I observed a strange bug that occured when trying to invoke a PowerShell job via the Windows Task Scheduler. In my […]

PowerShell 0

Invoke-WebRequest uses id attribute of input element as field name in form fields collection

As already described on elsewhere on the Internet and on Microsoft Connect, the new Invoke-WebRequest Cmdlet, that comes with PowerShell v3, handles form fields incorrectly. Instead of referring to the name attributes of input elements within a form the Fields Collection stores the ids of the attributes under the ‘key’ property. As in the following example you see the text […]

PowerShell 1

[Array] becomes [ArrayList] when imported via Import-CliXml

Serialising and Deserialising data structures is pretty easy when using Export-CliXml/Import-CliXml. However, there are some gotchas. In addition to the already described bug when using [ordered] hashtable in PowerShell v3 with Import-CliXml there is another error when importing [Array] with Import-CliXml: an [Array] becomes an [ArrayList]. The following code shows the problem: Again, this error seems to occur when you do […]

PowerShell 1

[ordered] hashtable becomes hashtable when imported via Import-CliXml

The new powershell feature “ordered” hashtable (a new PowerShell feature in v3. See OrderedDictionary Class) becomes an ordinary hashtable when it is imported via Import-CliXml. There is a “active” bug on Microsoft Connect OrderedDictionary becomes Hashtable when exported to and imported from clixml but no action for a couple of months. As a workaround do not use ordered hashtables but […]