Reply To: Sort Physical Disks by FriendlyName
Thanks folks. The Replace option simplified it nicely. I also just didn't have the sort-object -property syntax for the custom sort value correct. I've fixed it now and it looks good.
View ArticleReply To: DSC
Just ran into the same problem. PowerShell provider MSFT_xDSCWebService failed to execute Set-TargetResource functionality with error message: ERROR:...
View ArticleWildcards in switch strings
Hi, I have got some trouble with the switch statement because I have to check log statements from a logfile. The statements could be for example: cvs [update aborted]: no such user XYZ cvs update:...
View ArticleReply To: DSC
If you don't wanna take chances, just set the language to English. It worked for me.
View ArticleReply To: Wildcards in switch strings
If you need to match a literal ?, * or square bracket character in a wildcard string, place that character inside a set of square brackets: $strings = 'Whatever UXYZ Whatever', 'Whatever ?XYZ...
View ArticleReply To: String wildcards
Have you tried "net view \\share01" ? It's an old way of displaying shared folders, printers, etc on an SMB endpoint. You'd have to do some string parsing to pull out the share names, but it might work.
View ArticleReply To: Wildcards in switch strings
If the problem is, that the shell takes "?" as a wildcard, but you want it to be a literal "?", you can use the escape character, which is a bactick, just before the "?". Like this: `? This way, the...
View ArticleReply To: String wildcards
Dave Wyatt! what a genius! That works perfectly – String manipulation is no problem i can see all the shares! Thanks very much thats very helpful!
View ArticleReply To: DSC
Language is English but with Danish region. Everything seems to work so I am a happy camper Best regards Stig
View ArticleReply To: WMI Event Creation-RoboCopy
I think you'll ultimately find that WMI's eventing doesn't perform especially well with this class. If the goal is to watch for new file creation, the .NET Framework's FileSystemWatcher performs much...
View ArticleReply To: PSremoting in Workgroup Environment
Thanks you Don ! This info is very useful.
View ArticleExtracting the Private Key from a PFX
Given the recent and on-going issues with OpenSSL I am looking for another way to extract the private key from a certificate PFX file. Is there a way to do this via powershell?
View ArticleReply To: Extracting the Private Key from a PFX
I don't know of a way to do this with Microsoft's built-in crypto APIs, but it looks like you can use some of BouncyCastle's API to accomplish that. See...
View ArticlePowershell Ruan As Administrator
Sorry for my bad English. I wanted to ask if there is a solution for this problem. Run powershell in administrator mode and then run a command that writes to me in a file the characteristics of the...
View ArticleReply To: Powershell Ruan As Administrator
Look at the -Command parameter of PowerShell.exe. That's how you launch a new copy of PowerShell and pass in commands.
View ArticleReply To: Powershell Ruan As Administrator
Here are a couple of examples on how you could accomplish this: http://rkeithhill.wordpress.com/2013/04/05/powershell-script-that-relaunches-as-admin/...
View ArticleReply To: Powershell Ruan As Administrator
Thank you. I can create a script without operator intervention? I did not understand, however, how then to pass the following commands: $ Computers = Get-WmiObject-Class Win32_ComputerSystem $...
View ArticleReply To: Installing an exe with Powershell DSC Package resource gets return...
Just wanted to mention I had something very similar happen when trying to install VS 2013 via DSC. Running the installer outside of DSC with the same command-line arguments worked, so I'm curious what...
View ArticleReply To: Installing an exe with Powershell DSC Package resource gets return...
Based on that log output, I suspect that the VS2013 installer would also fail if you manually executed it as System (via psexec /s ). The system account's domain is "NT AUTHORITY", not the local...
View Article