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

How to get command result to a variable

Hello, I have the following commands to get the number of lines that contains "here is the line". However the variable linecount is always null for me.Any suggestion? Thanks! set linecount=(typet...

View Article


Script to update the UPN suffix

I m trying to change the UPN suffix for users in test OU using Powershell script, however it is prompting for values:#Script to update the UPN suffix Get-ADUser -SearchBase "ou=Test,dc=THG,dc=local"...

View Article


obtain specific event data

Can someone advice how to obtain a specific eventdata from the events? I saw another thread about getting eventdata, but that is from a specific event. I would to see the eventdata for all the...

View Article

Scraping with powershell

HiI'm new on Powershell, i'm trying to scrap the web page of a couple of our printers in diferent locations so i can automate the counter retrieval.The problem is that when i use weblient class to...

View Article

E-mail notification using powershell script in 365

I need a e-mail script that works using 365. Here is what I have so far and I cant get it to work.Function EMAIL{ Param( $emailSmtpServer = "XXXXXXXXXXX", $emailSmtpServerPort = 587, $emailSmtpUser =...

View Article


OLK folder delete Office 2010

I am trying to delete the content of Outlook 2010. The location is right. Using the following script as a logoff script to delete the content (location of Office2010 is the right one there are the...

View Article

VBScript input parameters

I am trying to run a script with a GPO that will install a printer, it's port and name and drivers etc. How do I format the input parameters and pass them into this script, also any errors you see...

View Article

Need help on script to exclusion some files under folder which is also part...

Hello , i have a below script which is working very fine but now i need to EXCLUDE some files which is started with prefix PHONE, PIN, SMS how can i do that.Below Script will Delete all child folders...

View Article


Batch file extracting all files from nested archives

I have managed to leverage a powerful forfiles command line utility with the mighty 7z compression program.Below is a simple batch file extracting all files from nested archives hidden at any depth...

View Article


script to run?

I have one batch file (which just need to register and start one service) on 17 servers (all are windows 2008 R2 servers).What is easy way to script (powershell) to run the batch instead of logging on...

View Article

need help creating a powershell script to call a list of networked servers...

need help creating a powershell script to call a list of networked servers and to find a file in each. This should search in all servers irrespective of model, architecture and OS version and in...

View Article

GetObject( "IIS://" & serverName & "/W3SVC" ) not work to get remote win2003...

Hi Guys,I try to check IIS account IUSER and IWAM on remote servers. But I found the code not work for getting remote Win2003 but works fine to get remote win2008. Can any one give some adivce?...

View Article

Robocopy. Suppress alert in a batch file

I am getting a bit frustrated with these out of the blue pointless alerts that stop my batch scripts dead in their tracks. Sometimes I say to my self, "what they heck were they thinking when they made...

View Article


send mail from vb script with attachement

HiI am running below script which is help to export next 90 days account expiration users from AD.But I need to send the output file as attachment on mail.. while I am trying getting below error:Error:...

View Article

HTML color in powershell

Hello , I want to change one line color in powershell only. but when i tried to change it , the changes are in all the lines , how can i tell him to change it only if the word "DOWN" is in the line.i...

View Article


Update User Attributes from CSV File

Update User Attributes from CSV File (v1.1)http://gallery.technet.microsoft.com/scriptcenter/30f07744-2fcd-499d-abe3-4e251014f58aThe script isnt the issue. It works fine.But I want to rewrite the...

View Article

Powershell script to delete folders from list

I have a list of usernames that match the names of some folders on our network file server.  Not all of the usernames in the list are going to have home folders created, some may simply not exist.Here...

View Article


Enabling printer PIN for network printers

Hi,I have a requirement to make it mandatory for all the network printer users to enter PIN before they print a document. Is there any way to do it.That is in simple way make a printing job more...

View Article

Scripy producing empty csv file

Hello,Please help, I don't know what's causing this - It's producing an empty csv file.$computers = Get-ADComputer -Filter * ForEach ($computer in $computers){ $Result = New-Object PSObject; $Result |...

View Article

PowerShell GUIs - Active Directory, Directory Object Picker?

So getting the OpenFileDialog box is amazingly easy in PowerShell so I assumed the DirectoryObjectPicker might also be as easy.  However, I cant' find any reference for using PowerShell with the...

View Article
Browsing all 15028 articles
Browse latest View live


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