Quantcast
Channel: The Official Scripting Guys Forum! forum
Browsing all 15028 articles
Browse latest View live

Question about -f formatting operator

Why would:"{0:D4} UNIT HIT ON ENTERPRISE AT SECTOR {1:D1}-{2:D1} ({3:D4} LEFT)" -f $H, $K[$I-1][1-1], $K[$I-1][2-1], $SThrow:Error formatting a string: Format specifier was invalid.. At line:1 char:75+...

View Article


Mounting a VHD File for Personal Storage

Hello - I have an idea but I have no clue where to start with this.I would like to write a power shell script that runs each time a user logs in to a Terminal Server.During the logon process, the...

View Article


Large WMI query (wmi quota violation when accessing DfsrIdRecordInfo class)

I have a DFSR connection replicating about 6000 files between 2 servers. I have been able to use DfsrIdRecordInfo to query smaller DFSR databases, but when I try it on this one I am not able to return...

View Article

Script for manager field in AD users and computers

I was wanting to make a script to e-mail managers after every 6 months of an employee working. I know there is a field in AD users and computers to put down your manager. I just wondered if after every...

View Article

Script to Scan for .PST files

Hi All, Please I need a script to scan the local drives of  a  computer for PST files  and then create a folder with the computer name,Copy the found PST's to a share on the specified network.  I found...

View Article


Check AD User Replication with while and foreach

Hello scripting expertsI'm not a powershell specialist . I had built a script that create an ad-user and give them permissions to a folder with set-acl. With set-acl i can't set a specific domain...

View Article

Help with Replacing text in a file using a vbscript

I have the following script which I am wanting to 1. Take the prf file and read it2. Edit a line in the  outlook .prf file replacing it with the text I have asked it to replace which is the full name...

View Article

VBS objshell.AppActivate doesn't work with Windows Task Manager

Hi all,This script do the following : Open Adobe Flash media Live Encoder with an encoding profileActivate the Adobe Flash... WindowSend enter key to start encodingSet objShell = WScript.CreateObject(...

View Article


Powershell: Add a linebreak in the find and replace strings

I want to add data to a xml export file. Therefor I need to search for a multiple occurrences of the value with has a linebreak (otherwise the string is not unique for the value I want to change) and...

View Article


Invalid XML while using WinRM

Hello! I'm trying to invoke a method ("execcmd") from PowerShell (Windows Server 2012) which executes a command on a Remote Machine (CentOS 6.4) using winrm. The method "execcmd" is member of the...

View Article

How to use the index property of the DfsrIdRecordInfo WMI class for...

I attempted to use the DfsrIdRecordInfo class to retrieve all files of a somewhat large (6000 file) DFSR database and was getting WMI quota errors. Doubling and even tripling the wmi quotas on the...

View Article

Difficulties with the function call

Hi guys!I am sorry formy englishthere is a function:# Script:    Get-Remote-LocalAdmins.ps1 # Purpose:  This script can detect the members of a remote machine's local Admins group # Author:...

View Article

Bulk change to OU settings

HiI have a specific OUOU=Region,DC=domain,=DC=localWhat I need to do is create a script that will go through each OU and its sub OU's and change the accidental delete property of each oneI know the...

View Article


Robocopy to move subdirectores, without deleting root directory

Is it possible to use robocopy to move all folders from C:\robo\test to C:\robo\test1 without deleting C:\robo\test? Here's what I'm currently using : robocopy C:\robo\test C:\robo\test1 /MOVE /E /R:2...

View Article

Power Shell script to check files and display a message

I have the following requirement.I have some 800 servers which get a set of files transferred from a remote source each and every hour in a designated location on the server. The file names are...

View Article


How to get the user name from particular Application event using Powershell...

Hi, I want to retrieve the user name from particular windows event ID using powershell script. Could anyone help me?

View Article

VBScript For Listing Owner & Email of Public Folders

Hello,I am looking for a VBScript (not PowerShell) that will do the following:>> User enters the Exchange Server Name (Exchange 2003 or Later)>> The Script should search and list All Public...

View Article


Powershell error handling when using DOS command mixed in

My shutdown script using the Shutdown -R command to do a mass reboot of machines. If the Shutdown -R throws a error like "RPC Service Unavailable, or access denied" I can't catch it or just don't know...

View Article

Need help converting batch to Powershell

Batch will create a record based on the number of the hostname. Example: If servername is "Hostname20" the record will be added with IP 20.20.20.20. if %lsv% EQU 08 set lsv=8 if %lsv% EQU 09 set lsv=9...

View Article

Robocopy to move files and folders without deleting root directory

Is it possible to use robocopy to move ALL FILES AND FOLDERS from \\server1\share1\robo\test to \\server2\share2\ robo\test without deleting \\server1\share\robo\test ? (last part of share1). The root...

View Article
Browsing all 15028 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>