move-Item : move files to a file but a directory
Hi , everyone I have a question followed.i want to move some pdf files to a directory . the ps command as follows:gci . -force -Recurse -include *.pdf | Move-Item -Destination "E:\AllPdfFile" -Force...
View ArticleHelp with Forms/Picturebox/DragDrop
I'm trying to add drag and drop capabilities to a picturebox form object and need some help with events and methods. The idea is to drop a new jpg file from explorer to update the image in the...
View Articledeleting file based on date which is on the Filename Useing powershell
i am doing a project and deadline is coming too close ....... this is how file in my folder looks BRDB0001_db_F20130316132517.bak i hve to delet file based on date on its file name which is older than...
View Articleon removing item
$Files = Get-ChildItem C:\Users\xxx\Desktop\PRD\Data\03_Processed -Filter *.zip -recurse #| % {$_.BaseName} $Days = 10 foreach ($file in $Files) {...
View Articleuse the value globally in different scripts.
Hello all,I am writing a script1.ps1 and script2.ps1. and want to store the value in a variable in script1.ps1 and use that value during the execution of script2.ps1 . is it possible. ? such that...
View ArticleNeed to get a users MemberOf and the groups ManagedBy as variables.
Hey,Working on a script to disable user accounts, and i got a request to add a function so that everytime a user gets disabled the script sends a mail to that users boss/bosses.Since we have all bosses...
View ArticleRemote registry key export/save/import/restore...
I need to export registry keys from a remote computer for import into other remote machines (copy) using PowerShell V3.0.When I use REG QUERY to view the registry keys thus: reg query...
View ArticleFind all images and export size per folder to csv
Dear,I'm trying to write a script that displays me the amount of image (video,audio) files users have stored in their homedrives. It needs to go through the mainfolder let's say x:\homedrives where all...
View ArticleSet up remoting to allow commands from only a single specific mashine?
Hi. I was wondering if it is possible to set up remoting to allow commands from only a single specific machine?
View ArticlePowerShell your world cup
And of course just 20 mins after finishing work I had a few functions, here is how you use them.Read More
View ArticleRunning PowerShell script as different user
HelloI need a way to run a PowerShell script as a different user (I do not mean RunAs Administrator)I see some examples of user Start-Process with the RunAS option but this is to RunAs Administrator as...
View ArticleReport on folders displaying size but also other calculated values
Dear,I have a powershell script running, which returns me a proper report on the size of all subfolders of the homedirectories on our...
View ArticleComment base help is NOT working as expected.
I'm not getting the correct help info, when I do get-help. Using the below code. I get some info (NAME, SYNTAX) etc. But I don't see SYNOPSIS & DESCRIPTION. What I'm I doing wrong?function...
View Articlecopy file to multiple computers
Hiim trying to copy a file from one computer to multiple servers.I want to use a txt (Srvlist.txt) file containing the servers name.but I get an error that the path cannot be found.I can copy the file...
View ArticleHelp copy and remove item
Hello,Iall the filesin the source directoryand sub-directoriesdizinlerdrefiles fromtarget1andtarget2preservingthe directory structureyou wantto copyanddeletefiles that are copied.(Duringthe...
View Articlehow to delete home folders via powershel
Hi everyoneHope you can help meI work for large firm and need to delete left users' home folders from all of the file servers and need to help to get it workingthis is what I have and I believe I still...
View ArticleNew-Item Cmdlet is breaking my script
I have a script that does the following:Check to see if the designated file backup location is online/present ... if NO... alert persons via e-mail ... if Yes, check to see if there are files in a...
View ArticleI want to deploy/transfer a script on 20+ servers
Hi,I have a script that I would like to place/deploy into 20+ servers before I can execute it. Can someone help me I am completely clueless as to how to start it.
View Articleopen port 7 echo protocol on windows 7
Dear Sirs I'm trying to open port 7 for testing purpose using the following command$tcpClient = New-Object System.net.sockets.tcpclient$tcpClient.Connect("test-pc",7)but I'm receiving the following...
View Article