Reply To: pssnapin question and OneNote
Thanks for the fast reply. I uninstalled and reinstalled the OneNotePowershell.msi, ran the Enable-OneNote.ps1 and came up with the same error (Add-PSSnapin Microsoft.Office.OneNote not found). I...
View ArticleRemotely grabbing username
I am using Get-item env:\username and I would only like to grab the value so I can set it to $strname PS C:\Users\testuser> Get-Item env:\username Name Value —- —– USERNAME testuser Thank you for...
View ArticleReply To: Remotely grabbing username
For environment variables, there's a shortcut syntax: $env:username I'm not sure where "Remotely" comes into this question, though.
View ArticleReply To: Capture cmdlet progress bars
If you've plenty of time on your hands, another way would be to execute these actions via the DISM API, which has a callback, DismProgressCallback . It's a Win32 API if i recall though, so won't be...
View ArticleReply To: Executing Powershell from C#
Dave, That actually made such a significant difference that the original approach may just be feasible. Very much appreciated!
View ArticleReply To: pssnapin question and OneNote
Joe, No problem. Get-PSSnapin only shows snap-ins loaded into your current session. PS C:\> Get-PSSnapin Name : Microsoft.PowerShell.Core PSVersion : 5.0.9740.0 Description : This Windows...
View ArticleSubmit the form and get warranty details using Invoke-WebRequest
It is my first post so greetings to everyone I am a beginner in PowerShell. I begin to like it. My goal is to check the warranty status using webpage. I am trying to submit Serial number and Product...
View ArticleReply To: Submit the form and get warranty details using Invoke-WebRequest
Hi Tomasz, Welcome to the PowerShell.org forums. For your next post please explain what is not working and what kind of help you're looking for. Please check if below code works for you: Param (...
View ArticleWildcards..
Hi All, So i've just finished the MVP Powershell course and figure i should put it too good use. Nothing better than practise, right? We've moved our Exchnage services to O365 and i've been tasked...
View ArticleReply To: Wildcards..
AD itself doesn't recognize wild cards, and it's the one processing the operation. There's nothing you can do about it; it's a limitation of the technology.
View ArticleReply To: Wildcards..
Hi Don, Thanks for your response. Please don't take this as anything other than my attempt to understand (i've a long curve ahead of me i think). If i enter PSSession with DC and run; Get-ADUser * =...
View ArticleReply To: Wildcards..
Certain parameters support wildcards. That * that you passed to Get-ADUser happens to be assigned to its "Filter" parameter, which does. However, you can't just stick wildcards anywhere you like. The...
View ArticleReply To: Wildcards..
Hi Dave, Thank you for taking the time to respond to the question, scary stuff this PowerShell and there's only so much you can pull from Google and Help files.. I shall test this (and break down the...
View ArticleReply To: $Allnodes.foreach examples
Jacob thanks for helping and thanks Dave for the examples , that's excellent , much appreciated , agreed the first example does looks easier to read and follow , and thanks for showing how you would...
View ArticleReply To: Submit the form and get warranty details using Invoke-WebRequest
Hi Daniel, Thank you for the reply. Your code works for me. I like the way you used '-join' operator to pass all argurments. Finally to obtain the clean values I processed the object in the following...
View ArticlePsObject in a String
this is my code write-eventlog -computername $env:COMPUTERNAME -logname Application -source ShmeibarCheck -eventID 32 -message "Check Status of $Object.Server Status $Object.PortOpen" and the...
View ArticleReply To: PsObject in a String
Hello Itamar, Option 1: Tell PowerShell you want $Object.Server or $Object.PortOpen to be evaluated inside the string using the $( any expression which can be evaluated or executed ) syntax....
View ArticleReply To: Submit the form and get warranty details using Invoke-WebRequest
Tomasz, Getting warranty information via the HP websites is kind of tricky. Scraping the web sites and posting forms does not really work for a long time and the >20 serial number page throws in a...
View ArticleReply To: PsObject in a String
You can loop through the elements of the $Object.Server array and write them individually to the log. That would post several event-32s in the log. Alternatively, you can create a temp string variable...
View Article