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

Replace Group Attribute "Description" and "Info"

Hi.I have several houndreds of groups where description and info fields are empty or false. Therefore, I'm trying to create script that can automate the following for me, however I cannot put it...

View Article


We need a Script which can execute multiple sql scripts in sqlplus

Hello,We need a script which can execute multiple sql scripts in sequential order. The script should go and execute the script1.sql first and wait for this to complete and then execute the second sql...

View Article


Consume secure webservice (ssl server authentication only) from VBScript

For a project we need to call some webservices from vbscript. These webservices are protected using SSL (Server only authentication).I know how to do this in C#, C++ (using gSoap), but this is first...

View Article

Trying to modify a script to use test-connections in multiple domains?

Hey Scripting Guy!I've created the script (below) to use test-connection against a list of hosts and write the results of the machines that respond to a .txt file. The only issue is that one of my...

View Article

Setup User Files Through Batch File

Good Morning All,We have a sharp copier/printer that requires a user number to print in color.  We are getting ready to switch print servers and I do not want to go around to everyone's computer and...

View Article


Get-QAD ExtensionAttribute

Any idea why the below returns no results.It should return over 4000 accounts.get-qaduser -enabled -SizeLimit 0 -IncludedProperties samaccountname,extensionattribute9 | Where-Object...

View Article

How to remove html body icon from send-mailmessage mail

I am using send-mailmessage to send server alert with the .txt file, However when I see the email, it was added with the document body icon  says "Type: application/octet-stream, Name: ss.txt". I dont...

View Article

Powershell Script from ADUC Context Menu

I'm wondering if it's possible to run a powershell script from AD Users and Computers context menu. I have the Menu entry created, but it doesn't appear to execute the script. I don't know if it's...

View Article


RegEx question

Can someone tell me why this expression does not produce a match with one space at the end:$MyPattern = '^(5[1-5]\d{14})|(5[1-5]\d{2}[-| ]\d{4}[-| ]\d{4}[-| ]\d{4})$' $MyString = 'MC1...

View Article


Image may be NSFW.
Clik here to view.

Trim text in CSV to first 50 characters

Hi,Hoping to get a little help with this. I have a CSV file which is generated by another script. But i need to make sure that none of the values in the CSV file are greater than 50 characters long....

View Article

get-childitem, cant exclude directory

i am trying to search the hdd for a .url shortcut, my script is pretty simple, but I am trying to recursively search the drive and exclude the windows folder. I have tried exclude, I have tried piping...

View Article

Comparing count and combined file sizes of specific file types in target...

Hi all, I have a script that I use to delete files with a certain file extension in a folder and its subfolders. I would like to enhance to the script by counting the total number of files and their...

View Article

Image may be NSFW.
Clik here to view.

Get location and hometown from Facebook

I'm testing a module of Facebook ( http://facebookpsmodule.codeplex.com/ ).I got a list of all users in a group using (get-fbmember 123456789, example )With the list of user I tried to catch location...

View Article


Using Poweshell Add-Computer on Script startup

Is it possible to user Add-Computer in a Startup script in windows2008r2? The script works after the computer has been boot, however when we added into the startup script it fails. Any other way to do...

View Article

Active Directory Object Properties

Maybe I am completely missing something, but is there no way to create an array of properties from get-aduser? I need to iterate through the user properties to find certain criteria. Even if I do:$user...

View Article


Problem running a powershell script on Server2008

I have a script that references another PS script that deletes a bunch of files in some folders.  Both files are in the same folder.  When I run my script, it works fine and the files are deleted from...

View Article

Need existing custom script to run with a .csv or .txt file

Hi, Scripting Guys!I am a very novice novice when it comes to PowerShell -- I'll state that up front. So apologies if the answer to this is really basic. I am trying to use a script written by someone...

View Article


Combining multiple arrays into one

I am sure this is probably really simple to do, but for some reason I just cannot figure it out.  I am creating an HTA that will be used to backup terminated employee's PC.  It will scan the drive for...

View Article

escape code not working

| where-object {$_.innerText -eq 'Todays`'s Deals'} I have tried escaping the quote with a back apostrophe and with two single quotes, either way the script blows up. Any suggestions?

View Article

Enabling Windows ICS from PowerShell

I am trying to use Windows ICS to share the computer's internet connection with a separate adapter in PowerShell. This is what I have so far:# Register the HNetCfg library (once) regsvr32 hnetcfg.dll...

View Article
Browsing all 15028 articles
Browse latest View live