Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Browsing all 6937 articles
Browse latest View live

Number of lines in txt

I wrote this tonight so, I can, get the title, author and links for the top 50 results, in my keywords.txt it works perfectly, but I don't know how to make it tell me the total number of lines/links in...

View Article


Hi im new my names re3t - Making Powershell talk and sing

Hi, im new, Instead of a boreing introduction I decided to do it this way.This is to demonstrate how fun powershell can be :) (New-Object –ComObject SAPI.SPVoice).Speak(“hello everyone at power shell...

View Article


powershell sreach function with regular expression

the text file content is:In this script, we have the following variables:1) $input_path to hold the path to the input file we want to parse2) $output_file to hold the path to the file we want the...

View Article

Who logged into my machine?

Someone knows a powershell command or script that allow me to know who was logged in my machine in the last 30 days?

View Article

Script behaves differently depending on how it's launched

Hi guys,I recently noticed a weird issue where a powershell script behaves differently, depending on how it is called. More specifically, the script isn't able to list all directories in the...

View Article


using `n how can i add two empty line (two carriage return), between these...

hi friendsusing `n  how can i add two empty line (two carriage return), between these two lines in the output file? PS C:\> $env:COMPUTERNAME|add-contentc:\file.txtPS C:\> $Env:USERDOMAIN  |...

View Article

PowerShell Script to run command on multiple computers and get results in...

I am currently working on a script that runs a command on multiple servers to get PowerPatch status information and return that information in a single text file. Has anyone don't something like this...

View Article

Using Regex HTML and If

Normal 0 false false false EN-GB X-NONE X-NONE MicrosoftInternetExplorer4Hi Thanks to people from this forum i managed to get a nice ping script (pings x number of servers) which i added to a...

View Article


For NuGet Visual Studio Extension

We have a functional test framework written in powershell that we use to verify the NuGet's behavior in Visual Studio.Read More

View Article


Powershell to email manager of employee's expiring password

Hi, I am a powershell beginner here looking for some guidance.I have the following script that pulls users that have accounts expiring in the next 14 days and exports them to excel with the manager...

View Article

How to add parameter to function counting working days in powershell?

Hello, This function is counting working days from specified date back in time. The question is : What is the proper way to addparameter to this function so this function can be used for counting days...

View Article

Get ADgroup properties

Normal 0 false false false EN-US ZH-CN X-NONEHi I am new to powershell, I need help to extract information into csv but not successful. I need information from AD, group with group name, description,...

View Article

List AD Users and All Groups in Excel

I Need a Script which lists all AD Useres with all their Groups and all ADGroups "not Member of" in one row in the same order. So the result is like a Matrix I did a Script with a Hashtable, which...

View Article


Trying to create a Powershell script to copy a user profile folder and all of...

Hi all,I'm trying to create a Powershell script to copy a user profile folder and all of the folders inside to another location.I have made this script and for some odd reason it only copies the...

View Article

Run selected .exe's and record time taken for executions

Hi allThis is my first port here.I need help putting together a PowerShell script to run selected executables and record how long they take to complete individually and then an overall time for them...

View Article


MAC Address matching

Hi I've been working on a PSH script to rename client workstations after sysprep imaging. I need assistance with matching the captured MAC address of the client with the known MAC Address and mapping...

View Article

Distinguished Name as Credential

Hello fellow PoSh experts.  I have an issue that has been driving me up the wall for days.We have an ADAM instance that will only accept distinguished names for authentication.  It rejects...

View Article


Try & Catch

Hi ,I would like to use ERROR handling with Try&Catch, that can handle $computername variable, if computer is not found, message comes up: "hey I did not find computer with this name"to where...

View Article

Delete a User's OneDrive through PS?

 Hi,Does anyone know if it is possible to delete a user's OneDrive through PowerShell?I have heard that it should be possible to do it in the interface by using /_layouts/15/deleteweb.aspxDoes anyone...

View Article

Powershell 2 and AlphaFS.dll - looking for the script to continue on...

Looking for a way to continue on exception - script exits when "Access Denied" to a folder exception takes placeUsing Alphaleonis library to get long paths (above 260 character limit). This script runs...

View Article
Browsing all 6937 articles
Browse latest View live