Quantcast
Channel: PowerShell
Browsing all 15370 articles
Browse latest View live

Powershell Move Files based on Date

I need a powershell script to move files from one target location to another target location based on the date I specified. The script also needs to override any existing files in the destination...

View Article


AD filter to get local administrator password expiry date and time

Hello,I am debugging LAPS (Local Account Password Solution) in my environment.Problem seems to be that due to unknown reason for some computers Expiration (Timestamp) is set to  "1/1/001 12:00:00"...

View Article


Powershell Move Folders from Source to Target

This is what I have, but I need to move subfolders of the source to the destination also. There could also be subfolders of subfolders. Any idea? Right now it only moves files in the root folder...

View Article

Pester and Try{} Catch{}

I am trying to learn pester by writing tests for an existing function I have. I want to change some of the functionality and need to make sure that I don't break anything, so adding some pester tests...

View Article

Get-OdbcDsn - Remote System

Hi All-Lab environment and am trying to retrieve a list of currently configured DSN from a system using the cmdlet Get-OdbcDsnSystem I am running the cmdlet from is Windows 8.1 x64 with Powershell 5.0...

View Article


Exchange 2007 module for Powershell ISE version 5.0?

Hey everyone!I just finished up a script that will create new AD users for me, adding them to membership groups and all that fancy stuff with one simple script and CSV files.However, I want to add onto...

View Article

Redirect console output in real time

I'm working with the delprof2 executable (https://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool/, deletes user profiles) and incorporating it into a PS script. Everything works as...

View Article

Script ro move list of folders with contents in csv

I have a client that has a list of job numbers that coorispond to a list of folders they need to archive. The challenge is that the job number is only the beginning of the folder name as there is...

View Article


I'm sure you all know about this, but do yourself a favor & paste in PowerShell

Powershell# inspired by: # http://forums.microsoft.com/TechNet-FR/ShowPost.aspx?PostID=2555221&SiteID=45$notes=@' 4A4 4A4 2A4 4A4 4A4 2A4 4A4 4C4 4F3 8G3 1A4 4Bb4 4Bb4 4Bb4 8Bb4 4Bb4 4A4 4A4 8A4...

View Article


Filename check script

I'm not much of a scripter, so if someone could at least point me in the right direction i'm happy to spend some time trying to write one. i'd prefer powershell, but batchfile or vbs would be fine...

View Article

Pester and Try{} Catch{} -- Or rather, don't use $Error in modules

I am trying to learn pester by writing tests for an existing function I have. I want to change some of the functionality and need to make sure that I don't break anything, so adding some pester tests...

View Article

Powershell If Statement Error

I want to create a powershell if statement. I want it so the user can only enter yes or no, if anything else is entered it will either ask again or throw an error.how can i do that?

View Article

Building an Array List and Exporting to a CSV

I have a script that parses an input csv file, and then new builds a ArrayList, which is finally exported to a new csv file. When I build the new ArrayList within my ForEach loop, it all works...

View Article


Variables in PowerShell Get-WmiObject Filters

Hello,Can someone please tell me the most efficient way of dealing with this problem. I'm trying to use a variable within a WMI filter and don't know how to deal with the inverted commas.I am trying to...

View Article

Remove Trailing Space

I am trying to remove the trailing space from a string see below. I am working with some client side email rules, and copying them to another mailbox when I use this command I get that...

View Article


PowerShell Command Question

Below is the syntax I am using to run a script that includes all the groups, group description and group category for any one user. What I am missing is a simple "ADUser -Properties | Select Name (type...

View Article

Powershell, prompt for reboot (remote)?

I'm using Powershell and a loop with this Powershell code in it:TextRestart-Computer $compname To reboot a mass amount of PCs. How can I adjust this so it prompts the user to reboot if someone is...

View Article


Not sure how to do this in Powershell

Now, I'm sure someone is going to shake their heads and say, man this is really easy, but here's what I', working on: A piece of the PowerShell script I'm working on goes:$OutFile =...

View Article

New-ADGroup with Notes field

Hi gangI am creating a lot of AD groups. We use the "Notes" field for more information on the group. Learned it is really "info". Importing csv file with all the details.This works fine.import-csv...

View Article

Powershell Array help

Hi,I’m looking for some help with powershell. I’m familiar using vbscript but never wrote a powershell script. Basically I want to obtain a list of iSCSI targets that my server has not connected to....

View Article
Browsing all 15370 articles
Browse latest View live


Latest Images

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