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

How to pipe ScriptPath results to execute login script

$script = Get-ADUser $env:Username -properties Scriptpath | Select-Object scriptpath \\domain.local\netlogon\$scriptAbove is example of what I would like to work.  Basically, I'm taking the Users login...

View Article


Split names

I have got a series which could contain the following values:Jansen RJansen - van der Vries VJansen - de Kip Q vanJansen - Haar W deIk would like to get the highlighted values into a separate string. I...

View Article


Parsing of Message field of Event Log entry using PowerShell

I want to do parsing of the windows security logs using Powershell,I want to select only Time, Account Name, Network Address, kindly suggest me.Get-WinEvent -LogName Security | Select-Object -First 1 |...

View Article

Compress files

Hi All, I have a folder with many logs in it, I want to compress all log files with name starting abc older than 8 days and delete all files older than 9 days in vbscript  .vbs file. I am able to only...

View Article

Creating Optional Parameter in Powershell Function

I'm attempting to create a function with an optional parameter (called a switch?) that will export the results to a .csv.  Below is what I've managed to cobble together and it mostly works. If I don't...

View Article


I am trying to find all users that have a valid email.

# Get-ADUser -filter "msExchUserAccountControl -eq '0'" | Select-Object SamAccountName | Export-CSV -Delimiter `t -NoTypeInformation -Path "c:\files\MAILAR.csv" #Get-ADUser -filter...

View Article

Image may be NSFW.
Clik here to view.

How to add images to the email body of my powershell script.

I have a PowerShell script to notify users when there password is about to expire. I would like to imbed these images into the email but I am having a hard time figuring it out. Below is the code and...

View Article

DCOM Permissions & Powershell.

Hello,I am attempting to write an automated method to pull permissions for all objects in a specific installed application.  I am leveraging accesschk.exe (sysinternals) to pull the effective...

View Article


Show size of folders using powershell

I have a task I need to do, which is get a list of user profiles and show how large the profile folders are in size, preferably megabytes or what ever. I am a bit rusty on getting this info and hoping...

View Article


Adding to the details pane in file properties

I couldn't figure out where to put this question, so I apologize if this is the wrong place, but I am trying to get extended file details in the details tab when I click on a file's properties....

View Article

How to catch the OpenError when removing and adding DHCP reservation

Hi,Got a script which "walks" through all IP reservations in a given Scope and rewrites them to another ones within the same Scope. I am using the Remove-DhcpServerv4Reservationand right after...

View Article

Query AD-Computers for Managed-by with deactivated users

Hello community,I need to query AD for computer-Objects that have no Managed-by-entry or that have Managed-by-entries with a deactivated user.I know how to query empty Managed by, but how can I query...

View Article

read output of a powershell script using C++

Hi All,I am calling a PowerShell script in a C++ program. PowerShell script creating a text file. When C++ program reading this file, may be due to format or some other problem, content was not...

View Article


Out-File to variable

HiI wrote a script that needs to have the output displayed on an html page. I currently have it creating an html file then opening it. Is it possible to have it store the information in a variable,...

View Article

Remote script execution - Avoid log-in prompt

I am trying to run commands(Ex:delete a file) with alternative credentials(explicit user name and password which is hard coded in the script) in windows 2012 Azure virtual machine. After searching...

View Article


files to be moved to month folder

Hi, I have 4 files here c:\test25-10-16_test1.txt25-9-16_test2.txt25-8-16_test3.txt24-8-16_test4.txtI would like to make a script that will move the files into folders named the month.The timestamp is...

View Article

VBScript running command line program (blat) works only once

All I am running blat from VBScript.  There could be many files with different extensions passing through on a given run.  I am using a loop to process each file.  It works the first time through, but...

View Article


VBScript : How to write different type of data in the same file ?

Hello,Using VBScript (only), How to write different type of data in the same file ?I mean by example : --------------------------------------------------------------------------------------------DIM...

View Article

Confused about context

I'm not a programmer and need some help with scripting an export from AD in PowerShell.The following command returns a list of all users who have "tvstation" set as their company field.get-aduser...

View Article

tool for Unix Shell scripts to powerShell scripts

Hi,Do we have any tool to convert from unix shell scripts to power shell scripts?thanks in advanceVenkatta

View Article
Browsing all 15028 articles
Browse latest View live


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