Reply To: Splatting in script
I'd mirror your parameters via splatting EXACTLY the same as the params that work. The double quotes aren't being used in the method that's working. Also, since you're closing the Generation param in...
View ArticleDSC Compliance Server and LCM's reporting back
In the "DSC Book" the section on "Compliance Servers" states: ".So, part of the LCM's job is to not only grab configuration MOFs from the pull server, but also to report back on how things are...
View ArticleReply To: DSC Compliance Server and LCM's reporting back
The compliance server endpoint is usually deployed under the same IIS website, which means it's the same port and so forth. It's a different service that the LCM calls. The PowerShell team blog...
View ArticleReply To: looking for guidance regarding html reporting
I don't think a hashtable would be the best approach. If your plan is to produce an HTML table, you'd want to create a custom object, and give it properties for each column you want the table to have.
View ArticleReply To: looking for guidance regarding html reporting
ok… will look in that direction. thanks very much for your input…. gonna be out on vacation for a couple weeks, so will post back then after ive messed with it a bit.
View ArticleReply To: DSC Compliance Server and LCM's reporting back
This is the link to the blog post Don was referring to: http://blogs.msdn.com/b/powershell/archive/2014/05/29/how-to-retrieve-node-information-from-pull-server.aspx
View ArticleReply To: Remote Service commands – multiple services/servers?
According to its help file, the Name parameter of Set-Service doesn't accept multiple values, so you have to use foreach. I can't test this right now and I don't want to mess with services on my...
View ArticleReply To: Splatting in script
The problem was exactly what you said! Now it completes successfully! Thank you!
View ArticleRename this String- Help
i have a bunch of files on a ftp server. there named with different naming patterns heres a couple 2014-06-09_1324_8328924511_16749732.wav 2065787459 by mkane@somecompany.com @ 1_17_36 PM.wav...
View ArticleHash Tables GetEnumerator method
#Instead of posting a large hash table the following generates a small one $hash = @{} for ($i=1; $i -le 20; $i++) { $date = (get-date).AddDays((Get-Random -Minimum 1 -Maximum 365)); $delay =...
View ArticleReply To: Rename this String- Help
Hi H. You could try something like this: Get-ChildItem -Path $sourcedir | foreach { if ($_ -match "(\d{10})" ) { Rename-Item -Path $_.FullName -newName "$($matches[0])$($_.Extension)" } } It's not...
View ArticleReply To: Rename this String- Help
its working on 95% but im a couple im getting this error Rename-Item : Cannot create a file when that file already exists. At line:7 char:13 + Rename-Item -Path $_.FullName -newName...
View ArticleReply To: Rename this String- Help
Then you might want to add a small test to check if the file already exists. If it does a new uniquie name needs to be hammered by adding something to the name. It could be any random number.
View ArticleReply To: Hash Tables GetEnumerator method
Worked it out. Hashtable.GetEnumerator Method Returns an IDictionaryEnumerator that iterates through the Hashtable. When displaying a variable the IDictionaryEnumerator Interface uses MoveNext to...
View ArticleReply To: Why does this PowerShell script fail to rename my files?
thank you that worked
View Article