Issues with the Contains Method of System.String
I am writing a tool that requires me to categorize text files based on the values supplied at a given portion of the file. Specifically, on line 26 of the file there is a statement such...
View ArticleCreating Custom Objects in different parts of the script
So, I have a script that i'm working on that I want to create custom objects based on results of part of the script for example.. I have a list of servers, lets say 10 servers$servers = gc...
View ArticleCan someone help me edit the script
The following script is supposed to give me disk space usage on my serverlist in a nice html format. But it does not work. Here's the script. I truly appreciate your help.. #requires -version 2.0...
View ArticleLastWriteTime
Does someone have an example on how I can conmpare files in two remote shares by the LastWriteTime property?...maybe by using the Get-ChildItem cmdlet?
View ArticlePing once every 5 seconds
ping computername /t | % {$_; Start-Sleep -Seconds 5} Does this command send a ping once every 5 seconds to the computer? Or dose the "ping computername /t" keep going then feeds the data to the...
View ArticleUsing Sql to perform windows update and schedule server reboots
I would like to use a sql database to query the reboot time of a computer and based on that info, perform windows update and reboot the server. The reason of using sql is for each computer may have...
View Articleslow script
Hello experts I spent some time constructing the below script to retrieve BIOS data from remote computers.however, the script seems to run for a very long time, I mean hours...While it runs, the excell...
View Articlesend-mailmessage cmdlet, Error variable and type of exceptions
Hi, In a script (in powershell 2.0) i use send-mailmessage cmdlet , and log errors in log file.Smtp server, recipient, sender are parameters of my script.I execute the cmdlet send-mailmessage using the...
View ArticleSVN and Powershell -HELP
Hi,I need to integrate with SVN from Powershell and get latest check in logs. Please send me know any resources in Web to get started.Thanks.
View Articlepassing variable between scripts issue - not working in batch file - Help
Hi, This is working from running PS1 but not working when running PS1 from batch file:sprint2.ps1:-----------Set-StrictMode -Version Latest$var1main=""$var1=""if ($var1main -eq $var1)...
View ArticleVery New to PS
Hi GuysI'm very new to PS and don't have any programming experience at all - is there anything out there to help a complete novice with no experience understand the actual language as well as the PS...
View ArticlePowershell: SVN logs formatting issue- please help ;...
Please help me formatting as table or list view for svn log output.$buildLatestLogs=svn log --limit 2 $Repo | Format-Table -AutoSizSend email code:$body = "$buildLatestLogs"Send-MailMessage -smtpServer...
View ArticleCustom Objects with Loops...
Hey All - I'm not 100% sure i'm doing custom objects properly b/c im not getting consistent resultsSo i'm delving into the realm of custom objects and Im enjoying it, but i'm not 100% sure of the...
View ArticleHow to get Send mail working?
Hi,I am very new to powershell. I am trying to send an email from windows server 2008 R2 machine.I tried this cmdlet;send-mailmessage -to "name@domain.com" -from "name@domain.com" -subject "Test mail...
View ArticleGet data from excel using OLEDB connection
Hi,I have a script that gets a variable from a Web page, and then search for the content of the variable in an excel file, and displays the data contained in the next column.Unfortunately, it used to...
View ArticleCSV parsing
Hello, experts! I need to parse .xls file, so i saved it into .csv to simplify task. The file structure: column1;column2;column3; ...data1;data2; data3; ...data11;data22;data33; ......Well, i need to...
View Articleregular expressions
Hello, i need to parse variable with html code using regular expressions. Variable consists of a big amount of html code like this: Install Mac address...
View ArticleWorking with the registry and windows forms
Hey guys, I am creating a 'Log Reader' which reads a set of registry entries that are written by an automated build process that we use for new servers, The log reader is meant to keep our techs from...
View ArticleInteger not showing up as Integer
Hello Can someone please explain the following to me, as far as I am aware an integer is a whole number therefore 13 is an integer where as 13.5 is not an integer.therefore why does $C when / 4096...
View ArticleGet-ChildItem Depth
Hello all. I am new to the forum and new to PS. I have worked out a script to determine ACL's BUT, I only need the first 6 children. Not the 20 or 25 folders deep that some of my shares have on them....
View Article