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

determine 32 or 64bit OS?

Hello, Need to determine via script if running on a 32 or 64bit version of windows. It needs to work on server 2003, 2008, and 2008R2, so Win32_Operatingsystem's OSArchitecture property will not work...

View Article


Filter can't handle object properties

Hi.I've just been struggling a bit with the Get-Mailbox cmdlet and been wondering if this is a general issue with filters in Powershell and why that even happens.Import-Module ActiveDirectory |...

View Article


Powershell last update installed on computer

Hi,I would like to find last date where an update was installed on a computer.When I use get-hotfix date is not always shown...Is there only wmic qfe to see it ? Because this is not powershell command...

View Article

Extract substring

I am trying to extract the country code from a list like below which is in a text file:lab.local/2003Servers/US/server123 lab.local/Servers/AU/server1$file= Get-Content .\list.txt foreach ( $i in...

View Article

Editing subsection of text in visio via powershell

I'm wondering if this i even possibleCurrently I have a script to create a visio drawing relevant portions of the text being used are: $application = New-Object -ComObject Visio.Application...

View Article


Image may be NSFW.
Clik here to view.

expanding the member list of a DL

I have this code that will get the members of the DL, however those DL with large member list it doesnt display all the members in the screen. I can use the switch "-expandproperty" but this would mean...

View Article

Error handling issue

Hello,I have a global misunderstanding about error handling. If I start some cmdlet that repeats some steps (classic pipeline for example) and one instance here drops an error but I want to ignore this...

View Article

Powershell Script for updating AD attributes on a set date

Hi,Wondering if anyone is able to help - is there a way to script editing an AD user's job title but on a specific date?For example change exampleuser's job title to examplejobtitle on 15th NovThanks!

View Article


Running an excel macro from Powershell

Hello all!I am trying to run an excel macro that's stored in a personal.xls file (in the XLSTART folder), in an automated script.  The problem is, I can run the macro when I put the commands in...

View Article


Script to delete after

I have got a script and it works ok but I want to add more command to empty the folder when all these tasks finished but not sure how as I tried to add Remove-Item -path 'E:\id\Upload\* it doesn't seem...

View Article

PowerShell Script: Export to csv file

OK, first of, a lot of y'all have been helping and guiding me with my first few PowerShell scripts and very thankful and grateful for all of the help. Still learning, of course.Now, more process and...

View Article

Using MS-Edge to replace IE11

I has been using Powershell 5 to work and manage webpages by something like below. Because IE seems being out of date. I am wondering if I can use MS-Edge instead. Does new version of Powershell has...

View Article

IP subnet sort and rearrange in CSV file using powershell

I am trying to create a new CSV "Vlan_CSV" from the below "Source_CSV". I tried multiple Powershell examples and failed to achieve the goal. Any help on this will be appreciated. I can't find a way to...

View Article


string parameter

I have a powershell script with parameters like below:[parameter (Mandatory=$False)][string]$myfileShare='\\myfileshare.myorg.org\Dev\projects',It gives an error:The assignment expression is not...

View Article

copy not done

I have a powershell script, that at a final step to copy a file from one directory to another.The permission should have no problem.But the file is not copied.if ($usemyShare) {write-host "$(get-date...

View Article


Cannot convert the "System.Object[]" value of type "System.Object[]" to type...

I am having an issue when running a swtich option in my script.I am trying to take group the batchID results and then combine the unique names and join themIf ($CSV) { $MBX = Get-CSVFile $MigUsers =...

View Article

vNext Work Around for Second Hop Issue on NonDomain Machines

I've asked the Microsoft Developer Community this question but I haven't had much success. I am trying to create some automation tests with a vNext Build Definition in which the build agent...

View Article


Add-Group Members to diffrents groups Using a .CSV file

Good evening guys, so i already migrate the groups from domainA to domainB, just the groups since users are new in domainB and they cant be migrated, now i need to fix the membership on this grups but...

View Article

Get adusers UPN

Anyone can suggest a one liner or script to get AD users that do not have UPN and email address matching? For example I have  mostly users with first.last@domain.com UPNs, but some are just just first...

View Article

Need to rename files based on specific string within the current name

I have a large list of image files that look like:78103OW-1-newcolor.jpg 78103OW-1-sandind.jpg 78103OW-2-sandind.jpg 78103OW-3-sandind.jpg I want to move the color to the front of the string (and...

View Article
Browsing all 21975 articles
Browse latest View live


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