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

Need help with invoke-webrequest cmdlet

hi all,I am trying to use powershell cmdlet invoke-webrequest to access a website that goes to "sleep" after about minutes, and I am trying to write a script using powershell to access the site like...

View Article


Powershell script run with TaskScheduler not stopping VM's

I have a script that stops and starts the VM's, and copies files and it works ok when I run it with powershell, but when I run it with TaskScheduler, it's not stopping/starting the VM's (but does copy...

View Article


I am running a Script in task scheduler and need powershell to run as admin

I am running a script that I know for a fact works when I run it in an administrator window. When I run it without being elevated it doesn't work. I added this into a task to run everyday at 11:00 but...

View Article

Need help creating a .bat script to copy a certain file based on screen...

I am pretty new to creating scripts so I thought I would throw this out there to see if anyone can help me.I am building a custom image that I would like to have my script change the Windows 7 lock...

View Article

how to check that MS Word is running using VBScript

we have an application that runs MS Word (hidden) to print documents. If one of the printers has a problem, then Word hangs while waiting for the spooler to return the 'queued' message. We have found...

View Article


Batch File Read Log 1st line

Hi everyone, I've a batch to robocopy folders every night between servers. A log file is generated and a mail is sent at the end using Blat.exe I would like to send the mail only if the robocopy...

View Article

HOW to run a batch file in DOS 6.22???

I have written a batch file that runs fine under Windows Command Prompt, but I would like to be able to run it after POST in DOS. I have copied my code to AUTOEXEC.BAT file which gets executed...

View Article

Powershell script to pull calendar data directly off an Exchange 2003 server

Hello, I began using powershell about a week ago when my boss asked me to write a script that pulled appointment info from an Outlook calendar and generate a reminder email. I found the Scripting Guy's...

View Article


Powershell script to extract a substring from a string

Hi ,I have to extract "Location - name" from the given Distinguised name exampleCN=01HW5abcde,OU=Laptops,OU=Computers,OU=Location - Name,OU=ABC,OU=ABC - Testing,DC=XYZ,DC=Contoso,DC=comI tried using...

View Article


Query Event Log

I would like to use a PowerShell script to check compliance on several systems.  What I would like is a script that would: query the events in a specific event log for the last 24 hours, look for a...

View Article

A bug with Get-ADDomainController?

Hi, is there a bug with Get-ADDomainController when used without NextClosestSite? I have a domain  dom1.corp.com  with 4 domain controllers in it, spread over 3 sites. In one of the sites, "Munich", my...

View Article

Powershell - how to add new line in file after 80 characters

I have a text file with (say) 500 charaters, I want to change it to file having new line after every 80 charaters.Input:...

View Article

windows OS activation status

Hi gurus  I am very very new to PS scripting and I am looking to run a PS script that will take all computer type object on a domain and let me know if the windows OS activation status is licensed or...

View Article


PowerShell script to set recycle.bin on all drives to 1kb

Hello everyone, We've noticed that there is a hidden, operating system file named Recycle.bin folder in each drive on our servers. I'd like to set the max size of that folder, can anyone provide me...

View Article

Question about how the Robocopy /B switch works...

I've been experimenting with robocopy recently, and most switches seem self explanatory for the most part; although I have a question about the /B switch.The help says the following:/B :: copy files in...

View Article


Listview control

I want to add a Excel like filter to a ListView in a powershell form.The end user would like the ability to sift through the data selectively instead of looking at a few hundred rows at a time.The...

View Article

Report AD display name & computer hostname

Hi Id like to keep track of which user is using which computers on our network and use the data gathered to feed into other scripts.Ideally 3 columns,  Windows display name,    ad account name,...

View Article


Powershell IDE - Syntax checking, refactoring, ...?

Hi, I'm now using powershell for a while. And I like the extending of the old batch. But I'missing a good IDE for using the power of the powershell. For C# I have Visual Studio - but nothing for...

View Article

Using -like operator to select recipients for Dynamic Distribution Group

Dear Scriptor,I got few thousand of data and would like to select recipient according to the CustomAttribute1.Below is the sample data in my database.Name: User1, CustomAttribute1: aa, bb, ccName:...

View Article

Set-ADAccount Script Help

Hi,I need a powershell scripts to clear the password on a series of AD accounts and unlock them if they are locked. I want to use the below format to take the users from a text file. I can't see how to...

View Article
Browsing all 15028 articles
Browse latest View live


Latest Images

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