Reply To: Input Box input a String
Thanks man…wait so PowerShell scripts aren’t backwards compatible? Hmmm and PowerShell 4 is out…scary
View ArticleAdding columns to an existing CSV
Hello all – We’re in the process of identifying all of our users who are still on Windows XP. I have been given a csv file of about 958 users. It contains their SAMAccountName and workstation names....
View ArticleReply To: Adding columns to an existing CSV
Import-CSV original.csv | ForEach-Object { $data1 = 'whatever' $data2 = 'hello' $_ | Add-Member -MemberType NoteProperty -Name ColumnA -Value $data1 -PassThru | Add-Member -MemberType NoteProperty...
View ArticleGui development
Mr. Jones I have been purchased tool making. I purchased as you had suggested to build GUI, with Powershell Studio 2012. I have created a GUI with a name, SamAcccountName, Phone, and email. I am...
View ArticleWSMan Config issue?.
Hello- I am running into a problem when I am piping computer names into a function I put together I have a list of 88 computers names saved as in a text file. The first 31 come back with the correct...
View ArticleReply To: WSMan Config issue?.
Try removing or commenting out that $ErrorActionPreference = “SilentlyContinue” line, and you may get some more information about what’s going wrong. On a side note, WSMAN and PSRemoting have nothing...
View ArticleReply To: WSMan Config issue?.
Thanks for the reply I am successfully getting back half the list of computers that I am piping into the function, with all the data from the WMI queries, it just seems to “freeze” halfway thru the...
View ArticleReply To: WSMan Config issue?.
Why are you testing remoting in this scenario? These 3 lines are the core of your script $os = Get-WMIObject -Class win32_operatingsystem -comp $Computer -ea stop $cs = Get-WmiObject -Class...
View ArticleTrapping Excel error messages in Powershell Scheduled scripts
Hi. I am new to powershell and have had to convert old VBA code on an old server to prosershell 3 on a Windows 2012 server. An OpenVMS system generates Excel XML spreadsheets complete with data which...
View ArticleReply To: Trapping Excel error messages in Powershell Scheduled scripts
You may not be able to; it depends on how the Excel Automation classes are written. What are you seeing in $error[0] when a problem occurs?
View ArticleReply To: Trapping Excel error messages in Powershell Scheduled scripts
Hi Dave Thanks for your reply. I was hoping there might be some variable that Excel uses to store the error code or message. This is the contents of $Error[0] Remove-Variable : Cannot find a variable...
View ArticleDeployment: Check AD for computername else generatecomputername with prefix
Hello, I’m a noob to powershell. I am trying to Check AD for computername if there is none based one the UUID then generatecomputername with prefix direct to AD. But i can’t seem to figure it out. I...
View ArticleReply To: Trapping Excel error messages in Powershell Scheduled scripts
OK, part of the confusion is that you’re looking at an error that has been wrapped in at least one extra layer of exception (MethodInvocationException, which is a PowerShell thing.) You can get at the...
View ArticleReply To: Gui development
Well, I’m not sure what you mean by “connecting the text box” to the cmdlet. If you can elaborate, maybe I can offer a suggestion. Also, SAPIEN’s forums are often a very good place for GUI advice.
View ArticleReply To: Trapping Excel error messages in Powershell Scheduled scripts
Hi Dave It works fantastically. Many thanks. David
View ArticleReply To: Deployment: Check AD for computername else generatecomputername...
You can simplify your WMI calls $ComputerModel = Get-WmiObject -Class Win32_ComputerSystem | Select-Object -ExpandProperty Model $SerialNumber = Get-WmiObject -Class Win32_BIOS | Select-Object...
View ArticleReply To: Gui development
sorry Mr. Jones I have create in the Gui four textboxes, (testing with only two) $Nametextbox1 and $SamAccounttextbox2. I also created a submit button. I fill in the name and Samsaccount and press the...
View Article