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

PowerShell and ADSI

I asked this question in another thread after I found a solution so i apologize if this is a repeat for some.Situation: Newly imaged Windows 7 PCWe run the Part1 script to:- Add the PC to the Domain...

View Article


Script Question - Gathering Software/Version from a list of servers

Scripting guys, was wondering if I could get a little help.  Basically, I'm trying to use a txt file as the input (list of server names), and I'm trying to get a return of certain types of...

View Article


Vbscript and HTA: when using option explicit, populating a select combo box...

Hi... I've got a handle on this except if I use the 'option explicit' setting. So even though this works :Sub LoadClassstrNewFile = "classes.txt"Set objFSO =...

View Article

Finding virtual, resident, shared, and private memory for a single program on...

Hey Scripting Guys,I wanted to know if there is a method to find virtual, resident, shared, and private memory for a single running program using Powershell. If not, what is a method to extract this...

View Article

HTA question. HTML button click and count the clicks failed

<html><head> <title>Test HTML button</title></head><Script language="VBscript"> i = 1 Sub RunScript DataArea.InnerHTML = "You clicked 'Count the clicks' button "...

View Article


How to verify local user&password on a remote machine with PowerShell

Hi everyone, Please help me, I am writing a script that can rename,join,rejoin,remove remote computer in domain.I need to verify local user and his password on a remote machine. Here is my...

View Article

How to add quotation marks with powershell

Im working on a script that will get input data from a txt file. This file is a list of values and some of these values contains spaces. It looks like this: Anchor Text Plug-in Cache Anchor Text...

View Article

VBSCRIPT HELP WITH PARSING IIS LOG FILE

Hi Scripting Guru'sPlease can anyone help me. I am using this VBscript to count the number of entries for "default.aspx" within my  IIS log files.Dim oFso, oReg, sData, lCount Const ForReading = 1,...

View Article


PowerShell: The type initializer for 'System.Management.MTAHelper' threw an...

Hi Scrippting Guy, I'm administering a couple of SAP machines. To avoid an Oracle Archiver Stuck I'd written a script AutoArchive.ps1 that checked the free space on the archiving drive and started an...

View Article


Comparing values of two cells from different xls files

Dear experts!I have 2 seperate .xls files containing information about disk space and corresponding costs. Now I need to write a script which automatically compares the columns containing the disk...

View Article

robocopy is copying new directories but not the new files in them

So, I have this script that should copy files from a server to a portable backup drive attached to my desktop.robocopy \\mango\Websites k:\Websites /S /COPY:T /R:2 /W:300 /LOG:k:\logs\Website.txt /TEE...

View Article

if command not working as expected

The if ($server -match "AMS" -or "BLU" -or "SIN") doesn't seem to work as expected. It executes /zoneadd but I want it to execute /zonedelete since $server bayphxdnsut02 does not match the if...

View Article

Powershell script to insert entire Defrag Analysis to a SQL DB

Ive tried to parse out only certain items from a server's defrag analysis and insert these items into a SQL DB but Im running into issues moving over items that are dynamic (changing) from one server...

View Article


Help needed with script using the Remote Registry Powershell module

I am looking for a way of finding out the version of Powerpath that is installed on multiple servers.  I found the Remote Registry Powershell module and it seems to do the trick, however when it gets...

View Article

Add-Type unsafe

To add C# code unsafe, I'm trying this:Add-Type-TypeDefinition $code ` -UsingNamespace 'System.Runtime.InteropServices','System.Text' `-CompilerParameters'/unsafe'But it fails.PowerShell says...

View Article


runas log off vbs script that calls a batch file

Hi. I want to run a log off script that will enable the automatic updates service in xp. The users do not have admin rights and we cant make them members of the power users group.I have a vbs script...

View Article

Set file sharing permission level powershell

Hi.Please advice how to share the folder with permission level read/write to domain\user. NOT NTFS permissions!!! I used function below, but it put ntfs permissions. It is possible to set share...

View Article


Powershell: How to pass 5 external string variables to a function that...

I'm trying to create a function that will need 5 string variables passed to it.  Those variables will be used for various cmdlets inside of the function.  I seem to be misunderstanding how to pass...

View Article

call a powershell script from vbscript

Ok  I am new to Powershell and I am wondering if there is any way to call a powershell from a HTA without giving the path to the powershell script, just by giving the name of the powershell. both files...

View Article

How can I have threadsafe instance variables within Inlinescript block when...

I'm using PowerShell 3 and playing with Workflows and I have run across something curious. I am using an inlinescript block hold some code to represent a task that I want to run many instances of. What...

View Article
Browsing all 15028 articles
Browse latest View live