Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live

Using test-path for Large folder enumeration over RDP

How can we measure the time taken by explorer to enumerate large folders (say 50k sub folders) using powershell ? I have tried test-path as below:$Time1 = Get-Date -DisplayHint Time$TestPath =...

View Article


Can I get a script to check for cpu load remotely

Hey can I get a script to get cpu load for about 10 seconds on maybe three remote servers....?

View Article


Using Powershell to clean up folder

Hi I am trying to create a powershell script that will look at a specific folder and remove folders whose names are "older that 31 days". Here is the catch - I want to delete them based on their folder...

View Article

Console Menu

I am wanting to put together a menu system that can be run by our helpdesk staff.I am wanting it be One opening menu followed by submenusJust not sure where to start

View Article

Copy directory structure with access permissions

This seems like a fun one.  I have a user share that has a folder for each one of my users that only they have access to. When I run Get-Childitem -Path \\Server1\users -directory, I get a list of all...

View Article


creating a log file during copy-item

Hey Folks, can anybody tell me how to generate a logfile during an copy-item job? THX

View Article

Compare folders recursively, Remove dupes.. Log everything!

Hi All!I've been working on this script on and off, and I'm stuck!I have two folders: Dev and QAReady. Each of these folders has 3 txt files in the root, along with 7 sub folders that cant be deleted....

View Article

Bulk Set NTFS permissions on folders

I work for a company that supports IT in schools.  We have developed a standard  AD, groups, folders and permissions structure, each school have their own domain but the structure remains identical -...

View Article


Powershell script to move files in folders and subfolders from one Network...

I am trying to use to below Powershell script:get-childitem -Path \\servername\location |    where-object {$_.LastWriteTime -lt (get-date).AddDays(-31)} |     move-item -destination "C:\Dumps"The...

View Article


Location based printing script

Normal 0 false false false false EN-US X-NONE X-NONE Im a new VMware View Admin and Im having an issue with location based printing. It is not consistently working and instead of spinning my wheels on...

View Article

Modifying the web.config

I am wanting to write a powershell script to change our web.config.specifically change to the appsettings but I don't seem to be able to select the correct key <appSettings>      <add...

View Article

Cut specific string from excel cell and paste to the next column

Hi,I have an Excel spreadsheet with about 17000 lines.In certains cells of col B, there is a string starting with "(If ISCunable to resolve, " then the rest of the string may differ.I need to cut the...

View Article

Custom 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 Article


Pre-Post script

I need to create a script that stops the lotus notes service before a back up is created  I know the script to stop the transfer , I  need to add a command to stop a service ? Any ideas ? Script is...

View Article

SVN 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 Article


Running PS script from SSIS script task VS running script from PS Command...

Hi,We are trying to run a Poweshell Script that uses the OnTap PS Modules, from SSIS, when we do, an error is issued:Error: The term 'Connect-NaController' is not recognized as the name of a cmdlet,...

View Article

Problem displaying expirty date of SSL certificate and the work around I used.

Hello AllI came across the following today, so thought I would make a brief post. I created a script to check expiry dates of SSL certificates (nice an easy with PowerShell thanks the the cert:...

View Article


Adding user input/output forms to scripts

Hello,At the moment I am using basic techniques like read-host and out-gridview for basic user input and output. I now want to start learning how to take this to the next level, and looking to the...

View Article

Issue with the shell.application com object and IE9

I have an issue with the shell.application com object and IE9.This code: set-variable win (New-Object -comObject shell.Application) -Scope Globalset-variable handle ((Select-Window -Title...

View Article

-filter and where

Hi All,I am very new to powershell and it is just days I started learning it. I have some idea on batch scripting. I am confused when should I use -filter command and where(or where-object) commands....

View Article
Browsing all 10624 articles
Browse latest View live