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

Disable accounts based on search

I'm trying to automate disabled our vendor vpn accounts at the end of the week. so far I have:Import-Module ActiveDirectory $Enabledlist = Get-ADUser -Filter {enabled -eq "True"} -SearchBase...

View Article


Powershell one-liner to add domain user to a local group

I'm looking for a one liner that can be typed in to add a domain user to a local group.  I know it can be done using net.exe but with the trend to move admin controls to powershell I doubt net.exe will...

View Article


Need help making a .bat script to edit Userinit in registry

Hello everyone,I need help building a batch script or vbs to edit Userinit located at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\What I need is a script to set it back to...

View Article

script for size of all messages older than 2 years

Hi,There is a mailbox that is close to 50 Gig in size on an Exchange Server. I would like to archive all messages that are say older than 2 years. This mailbox has many folders and subfolders.On the...

View Article

Check if User is Logged In

I need to check if a Domain User is logged on a server.  The following can't seem to match the pattern for the user but the variables seems to be okay.   The result is always false.  I've tried using...

View Article


Command to display only the latest modified directory within another...

Okay I want to be able to run a .cmd file from my workstation to query a certain folder on remote clients. I want the command to find the specific folder within another folder and display the current...

View Article

SharePoint 2010 Powershell scripting for user profile

Please help to have a powershell script which will provide the details related to user profile service application like:Number of user profiles:Number of user properties Number of Organization...

View Article

Add exsiting domain user to workstation with PowerShell script

Now that I finally have a little time to work on this. I wanted to give it a shot. A while back i created to .bat files. One to join a machine to out domain from outside our network and one to add an...

View Article


Working with WMI Events on a Remote Machine

I have a script (see following) that connects to a remote machine, runs a process, and attempts to wait for it to finish. The problem is it waits indefinitely. The "Wait-Event" call never...

View Article


Script Mapping printers with authentication in Active Directory - External...

HelloI'm havinga little difficultyin creating ascript.I have donesome researchhere in the forumandI foundthatscriptsdo notwork very well.environment:I havea roomherewhere thecompanyiscentralizedall...

View Article

Question about simple script?

Hello, I would like to write a small program/script and am looking for advice on how to do so. I do not have a preference about which method or language to use, hopefully looking for the simplest way...

View Article

Update-Help error when console application is run in remote machine via PS...

Hello,When I execute a particular console application in a remote machine via PS remoting, I get an error related to update-help. When I execute it directly on the remote machine, it works...My...

View Article

netsh and schtask startup script

Hi to all!I am having problems regarding my start-up scripts since the scripts won't take effect. Here are my scripts:(disableinternet.bat)netsh advfirewall firewall add rule name="blockinternet"...

View Article


Need a bach script to archive old files by zipping

   I am new to Batch scripting so expecting the help of the professionals.   I have E:\TIBCO\Spotfire Web Player\6.0.0\Logfiles with Spotfire.Dxp.Web.. files and E:\TIBCO\Automation...

View Article

Checking File version

HiI'm working on a powershell script that will check if a dll files version is correct on lots of servers. To keep it quite basic, I would like to output a warning in red to the screen. This is what I...

View Article


Symantec Endpoint Protection Manager Installer Information Script Error

hiI can't install SEP Manager 14.1 in our windows 2012 R2 server I got an error during the installation.While was installing symantec endpoint production 14.01 , I am getting an error right at the end...

View Article

Powershell output as boolean

Hello Scripting guysPlease prompt me. How i can get output as true or false, assume from Get-ADUser "j.maxi" or another cmdlet which outputs string, int, array?

View Article


How can you make a file name comparison

Hello, I'm making a program that would do the following:1.) Collect the names of folders (3 letter name)2.) See if there's any name of files that contains this format "ABC_"3.) If it does then put that...

View Article

Batch file for %% variable/rename %%~nf.*

HiI have the batch script below which does the following:1. recursively extracts .zip files (each zip contains only 1 file) using 7zip to a temp location2. Each extracted file is renamed to the name of...

View Article

System.__ComObject cast to int64 (PowerShell)

I have been through 20 sites trying to understand this, but I just don't get it... How do you change System.__ComObjects. I use the [ADSI] accelerator a lot and when it comes to converting Active...

View Article
Browsing all 15028 articles
Browse latest View live


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