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

test-path where a directory in the path is variable

My company has a series of fax lines and associated file shares. Faxes are processed & then dropped off into these file shares. From that point a service runs about every 60 seconds to look for...

View Article


Image may be NSFW.
Clik here to view.

Need Help - Batch File

This Script works well on Clean install but if it has an old version and I want it to check the variable gets broke someone in batch... I can type it in Command line and it works.Script:@echo off REM...

View Article


VB Script to move a file with date in name

I'm so stuck but I know Im close.  So its friday and I'm brain dead and I'm asking for some help please.I have FILES starting with dates140729HDF0.835140730HES0.835140731UHG0.835and I need to move the...

View Article

Adding child nodes to existing nodes in XML using Powershell

I have the following XML structure:<ovf:Envelope>  <References>  </References>  <DiskSection>  </DiskSection>  <NetworkSection>...

View Article

PowerShell Workflow: Returning $PSCredential from function

Greetings All,When using PowerShell Workflows, I have a function which returns a $PSCredential object, and workflow code that assigns the return to a variable.  The function call enters and exits...

View Article


oShell.run query

Hi allGo easy on me - trying to make move from batch to *.vbs. It's going ....ok.... so far. Most of the *vbs is working except:Dim oShell Set oShell = WScript.CreateObject ("WScript.Shell") oShell.run...

View Article

Schedule Task within script

I am trying to create a task with very specific options:This is how I create it from a CMD line:schtasks /create /tn "Taskname" /tr "\"C:\Program Files\Program1\Program2\Start.exe\"/T" /sc daily /st...

View Article

VB Script error - when try to execute a command on windows shell

Hi ,I had to create a scheduled task on a specific date - I tried using schtasks It worked well!.SCHTASKS /create /tn "Mytask" /tr "cscript "C:\Remove.vbs"" /sc ONCE /sd 08/02/2014 /st 14:25 /RL...

View Article


VBScript Update Multiple Reg Keys

HiI am looking to develop a vbscript that first check if the registry keys exist, and second if the value exist ignore to do any updates. But, if the values do not exist to perform an update.Const...

View Article


Event Log Content Email through Scheduled Task in Windows 2012

Hi,I am Using Attached Event to Task Scheduler on Many Windows 2008 Servers , When Someone logged in through remote desktop , I am getting an email with Server Name , User Name and Machine IP from User...

View Article

Powershell export

Morning, Sorry I am new to using powershell - it is a simple script to provide me a folder structure and files in a particular drive. I am struggling to work out why anything I try it will not export...

View Article

How do I know if the user is belong to Mail Restricted Group/s? Do anyone...

Hi Guys, Good day, I'm new in powershell scripting. Will someone can help me about my problem?Thanks.

View Article

Schedule Task within script for import module

Hi,Unable to powershell script in Scheduled task. I have added the import AD module in the powershell script.Every time I need to login into Windows 2008 R2 server and then the script runs...

View Article


Problem importing a module and finding it's commands?

Hi, I have a problem. I'm trying to import the DFSR module and use it's commands in my PS session.But, I can't get the commands to show. I've looked in my system32 directory and I can see the DFSR...

View Article

convert lastlogon date value (1/1/1970)

how to convert lastlogon valueSet objWMIService = GetObject("winmgmts:\\.\root\cimv2")Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkLoginProfile")Dim objLastLogonFor Each objItem...

View Article


VBScript to read from Excel, search AD and put a value back into Excel

I have an Excel spreadsheet that contains a list of hired and terminated Employees. What I would like to do is take the employeeid from only the terminated employees, search AD, and return whether the...

View Article

Change CDROM drive letter based on objItem.DeviceID

Good start was in: http://blogs.technet.com/b/heyscriptingguy/archive/2011/03/14/change-drive-letters-and-labels-via-a-simple-powershell-command.aspx but does not actually seem to work (Win 7...

View Article


System DSN not visible in ODBC Control panel

I am creating system dsn at run time using VB code to connect to database. My vb code makes entries in following registry key to create the dsn HKLM\SOFTWARE\ODBC\ODBC.INI. But I cannot see the actual...

View Article

Image may be NSFW.
Clik here to view.

How to stop the rename the cn again if it had meet the condition

How to stop to rename the CN in Active directory if running the script.This is my script:$objSearch = New-Object DirectoryServices.DirectorySearcher $dateNow = Get-Date $DomainDNS =...

View Article

How to change dns setting using powershell

Hi every one, I am really confused where to start from I would like to populate just two fields in network adapter setting. those two fields are preferred DNS and alternate DNS. The ip will be...

View Article
Browsing all 15028 articles
Browse latest View live


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