count files in a directory
hiI need a script to count files as they come into a directory.I only need to count the files not the other directories. the general idea is that files will come into the directory to be processed then...
View Articleremoving all Organizational Units via function
Hello everyonein my test lab i was successful to create a function which creates some OUs in Active Directory.but another function to remove them at once, doesn't...
View ArticleGet free disk space for different servers with separate credentials
I'm trying to query Disk space info on Grid box and Export it to CSV.I was able to use Marc Weisel's script to make it use different credentials. I used computers.csvto store the computer name and...
View Articlemodifying lots of user passwords using powershell and excel
Hi friendsout big boss asked something that I don't Guess be possible via PowerShell.the story is in our company each employee has its own unique code.our network is Domain & currently the password...
View Articleget-dns problem
Colleagues,i type get-dns cmdlet, and i gotPS C:\powershell_v3> get-dnsget-dns : Index was outside the bounds of the array.At line:1 char:1+ get-dns+ ~~~~~~~ + CategoryInfo :...
View ArticleDirectory listing to listbox
Hello all, I am trying to get a directory listing into a listbox and from there the user selects an item and it automatically launches it. I am stumped on how to actually get this working. I have made...
View ArticleProblem of return an array from function
Below is the example with strange behavior (missing the value of first index)[array]$container$container = @(0..2)function TestPassArray () { [array]$fcontainer $fcontainer = @(0..2)...
View Articlecreating mail by using script .
Hi, I was creating a script that ask you for some input . And convert this to outlook .I would like to know if someone could tell me how we could create table in script so that in mail info in a...
View ArticleConvert 'exponential notation" to Hexadecimal
HelloDoes anyone know how to convert numbers such as 2.46E+19 to hexadecimal ThanksAAnotherUser
View ArticleScript to show failed databases and send an email
Normal 0 false false false EN-GB X-NONE X-NONE MicrosoftInternetExplorer4Hi I usually check all the databases in the DAG to make sure there are none that have failed or suspended. The command i use is...
View Articlemove-adobject
I'm trying to read a file of machines and then move them to a different OU within AD. Right now my machines.txt only has 1 computer name.$FindPC=Get-Content"c:\temp7\machines.txt" $NewOU...
View ArticleFrom a specific list or OU, How to list all server Regional settings and...
People,I need your help in creating the PowerShell script to display the Server name and also the Reginal Settings and Locale so that I can change the server settings that is not standardize.from my...
View ArticleHow to get web page information?
Any way to ask powershell get information from one of the web page?Let's say I got below information:$a= "UserID" $URL= https://ebr.abc.com/admin/insync/#op=users-details/uid=$a/tabid=0 I need $c =...
View ArticleGrab username from CSV and then check if in AD
I have a script that writes data to the telephone fax field in AD. First it imports the csv file and then checks AD by the first field which is samAccountname and then finds out if fax field is blank...
View ArticleScript to pull Bios information from a list of Computer Names
Hello, I was wondering if I could get help with a powershell script to pull bios information from a list of computer names in a text file then export that info into a .csv file. #* FUNCTION...
View Articleparallel port GPI and GPO
I'm sitting in front of a Dell Precision T5500 running Windows 7 Professional, 64bit. It has a parallel port, (device manager describes it as "ECP Printer port LPT1"), with a driver provided by...
View ArticleFind only active user accounts
I found this command Search-ADAccount but it does not have any switch to find active user accounts. I need to find only user accounts that are active. and I want my output to have Fname, Lname &...
View ArticleRemove various Text Files with Date in Name
Greetings,I am just staring my PowerShell Career and would like assistance in creating my first script. I have various programs (on various servers) that write text logs which use up a lot of disk...
View ArticleCopy yesterday's log file to another folder based on file name
HiI am getting log files on daily basis with its date in *yymmdd.log format. i need to copy only y'days log file to another folder. would realty appreciate if you can provide some help on this.the...
View ArticlePipeline Variables
How do we assign the current value of one pipeline variable to another?This works fine for me.$hash = ((get-content .\hash.txt) -join "`n") | ConvertFrom-StringData$hash.GetEnumerator() | % { $_.value...
View Article