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

Bat file

I need to write a bat file that does the following:I would receive 2 files abc.20130702144012.out and cde.20130702144515.out (yyyymmddHHMMSS) and these two files has to be renamed and changed to...

View Article


Copy Folder & files to remote servers

I am using simple powershell script to copy  files from  local system to remote servers. i am using  same command by changing  sever name every timeCopy-item -path "c:\softwares\xyz.exe" -destination...

View Article


Dynamic Distrobution List - Target an OU

Hi Guys,I am trying to create dynamic distribution list that does the following. -Targets an OU -searches for staff with a titlesearching is fine but I cant seem to target the OU and still get results...

View Article

Remote computer query of application install date

I have an excel spreadsheet with 182 computers names on it.  I need to query the 182 remote computers for the application install date of (specific application xxxxxxxx) with the output being to an...

View Article

Parse and return multiple strings from log files and export to .CSV file

Hi All, I'm trying to parse the following log file and output to a .CSV file.  The log file is created by a utility called ROIScan which is created by MS for Office reporting.I need to search for...

View Article


powershell scheduled job

hi, I have a script I use to force logoff of users and reboot my server. The script works great but I would like to use a scheduled job to execute the script once a month at 6am. Can you tell me how to...

View Article

only the samaccount name for the group members and not the distinguishedname

Hello,Do you have a solution in my script to get only the samaccountname and not the distinguishedname of group members.Function HOgroup{$Group = Read-Host "Choose your group" $domainLDAP = [ADSI]''...

View Article

Reading Lines from a Text File with a Command Line Batch File

I have a txt file with data:useroneusertwouserthreeI'm trying to delele everything east of userone (UPM_Profile\LocalSettings_upm_var\TemporaryInternetFiles_upm_var) in the string below, but I have to...

View Article


Can't pull Max Password Age with vbscript

Ok, here's the setup.  My company has been building a new 2012 domain environment.  So far, all the servers in the domain are 2012.With the new domain, I have begun testing Fine-Grained Password...

View Article


Image may be NSFW.
Clik here to view.

PowerShell ConvertTo-HTML Problem

I am new to PowerShell and was working on a script to grab the state of services on remote servers and produce an HTML report that displays ones that have a State of stopped and a StartMode of Auto. It...

View Article

How to close wordpad.exe program

Hi have the following script, which works fine:@echo off for /F "tokens=1-4 delims=/ " %%i in ('date /t') do ( set WD=%%i set D=%%j set M=%%k set Y=%%l ) start /w sqlplus myuser/mypwd@mydb @export.sql...

View Article

Powershell - ConvertFrom-CSV not taking headers

Hi guys,I'm just testing a REST API for our Redmine system and hoping to use powershell to script some events.My script so far:remove-variable result $url =...

View Article

How do I parse the output from Get-WinEvent to only display the samAccountName?

Hi all, relative newcomer to PowerShell but loving it as I learn.Several months back I implemented  a scheduled task that archives and clears all the Windows Event Logs on my three DC's.  However, when...

View Article


How to write a basic script that will disconnect from wifi and reconnect to...

So, I would like to write a script that can be launched from the desktop of a windows 7 PC.I would like this script to essentially disable and re-enable the wireless network driver and then re-connect...

View Article

Powershell - Rest API with XML output

Good morning guys,I have a simple REST API call that returns XML but for the life of me I can't figure out why the file is coming back empty.My code:$key =...

View Article


How to get all the permissions assigned to shared folders in the domain?

Hello, I need to get all the shared folders permissions within my domain. I use Windows 7 Enterprise edition SP1.Are there any tools/scripts that can help with getting a detailed report with these...

View Article

ForEach-Object bug?

According to Get-Help ForEach-Object, ForEach-Object receives an input object which can be either piped or passed using the -InputObject parameter.However, this doesn't appear to be the case. Here's a...

View Article


User input for a DISKPART batch file.

I'm trying to create a batch file for Diskpart that requires user input, for example I want to use the command "list disk" and require the user to select a disk.I have used this disk part...

View Article

WMI Question re searching

HelloIf I am looking for files on a remote computer where PowerShell is not installed I some times use the CIM_DATAFILE class. For example the following query I put together will search a computer for...

View Article

Search and start all automatic services, those are in stopped on multiple...

Hi All,I am trying to achieve following two.Search all automated services on multiple remote system, those are in stooped.Start all of all of them.I am able to extract the information for first one...

View Article
Browsing all 15028 articles
Browse latest View live