Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

Trying to modify two AD User attributes for multiple users?

Hello,I'm a newbie to Powershell and need some help.I have a 2008 R2 AD and need to modify two attributes for multiple users.The attributes include "homeDirectory" and "unixhomedirectory".I have...

View Article


PowerShell ISE Ctrl+C/Break on java processes (maven)

First hello to all :)Second the problem:Each time I try to kill a java process ( by sending the command Ctrl+C) I see the message Stopping in the status bar, the console output is 'frozen' and nothing...

View Article


HOW TO USE LOOP INSIDE A Button.add_Click()

this is the code This do the work at one time only . I WANT  TO DO ONE ONE Kindly Help me$btn.Add_Click({ #########NGM############ If (Test-Connection 192.168.35.9 -Quiet -Count 3) {...

View Article

Add $computer to results of wmi-object results

Not sure if I need to put this in a new topic or not.  But in conjunction with task, i wanted to get a list of all servers and their current status of WinRM.  I was able to come up with this:...

View Article

PowerShell converting System.Byte[]

Hi, We have something writing garbled data to some of our extensionData attributes, on some of our Distribution Lists. I'll use repadmin /showobjmeta to track down the offending user account but in the...

View Article


How to change maintenance powershell script via GPO?

Per suggestion reposted from here:...

View Article

Move List of inactive machines to InactiveOU

Hi Team,I've list of inactive machines. above 3000 inactive machines is in excel sheet.i want to move them into inactive ou.Could you please provide me PS script for that, i want to move those inactive...

View Article

Need to format a vpn log text file into a format that can be written directly...

I am trying to do two thing inside of powershell1. Take a vpnlog text file  "C:\temp\ps3\vpnlogs\testlog.txt" formatted as such and be able to directly add the columns to a sql table"Number" "Date"...

View Article


Send-MailMessage script runs perfect on PSv3, but cannot authenticate user...

This drives me nuts: the code below runs perfectly in PowerShell Version 3. I can authenticate and send mail via live.com and googlemail.com. The password is "hardcoded" in the script, to avoid...

View Article


automating an RDP connection - before I just use cmdkey.exe and mstsc.exe

Hello,I have to create a function that can initiate an RDP connection to remote servers.. I know it can be done using cmdkey.exe and mstsc.exe directly, I've seen examples using that method. However...

View Article

Install-WindowsFeature from share fails

Hello,I try to install the Windows Feature "NET-Framework-Core" on a clean Windows Server 2012 R2 computer. I use the following command for this:Install-WindowsFeature -Name NET-Framework-Features...

View Article

Writing to a CSV from multiple sources.

I have a csv file that I am doing a import-csv on.  The csv contains and email address that I will search on and an account expiration date.What I want to do is do a get-aduser based upon the email...

View Article

List AD Group members of a specific type?

I have the query below that returns all the members of certain groups types i.e. Domain Local but I'm looking to limit the results to specific type of members i.e. users rather than computer or global...

View Article


Saving variables to use after restart.

Hi,I have a pretty simple script which makes a few changes to the registry, firewall and ip settings.  However after the restart and the registry 'runonce' is read to continue the scripts latter stages...

View Article

Assistance with my script to find all IP's attached to a network adapter

Hello,I have the following script that gives me details about a group of servers I manage.  I reads in a list of computernames and reports in a CSV file ComputerName, IP Address, MAC and disk size....

View Article


problem with the powershell pipline parameter process

Hi, I'm confused with the pipeline processing of object-property-parameter association.Here my Cmdlet example Function test-psboundbug{ [CmdletBinding(DefaultParameterSetName='Parameter')] param(...

View Article

How do I write out that a server I'm scanning is not available - Fails my...

I have this script that reads in a list of computers.  Works great so far...but I want to add an Else statement to my Test-Connection If Statement so if a Computer is not online or I don't have access...

View Article


Retrieving the COM class factory for component with CLSID...

I have come across a weird issue while running a PowerShell script through task scheduler. Below is the simple script which would open all the sites of a SharePoint farm in IE browser.Add-PsSnapin...

View Article

Can't get a volume to use auto unlocking via powershell

I'm trying to get a bunch of disks in my Hyper-V Server 2012 r2 to all be unlocked with the same key. I was successfully able to encrypt the OS drive with a USB key. However, whenever I try to use...

View Article

Output all DHCP reservations to file with PowerShell

I used this "script" to make a text file containing all DHCP reservations, including MAC addresses.  This does what I need but feel free to comment on improvementsGet-DHCPServerV4Scope | ForEach...

View Article
Browsing all 21975 articles
Browse latest View live


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