Quantcast
Browsing all 21975 articles
Browse latest View live

need assistance in bulk accountcreation

I have written this script  $users = Import-CSV E:\Users\raosid\blkusr.csv  $users| foreach-object { New-aduser -Givenname $_.First -Surname $_.Last -DisplayName $_.DispName -SamAccountName $_.Id...

View Article


Infinite While loop

Hello all,I've got a script that has a While statement an example of it is: While (1 -eq 1) {      If (Test-Path -path 'C:\My\Path)       { break }      start-sleep -Seconds 5        }This works well...

View Article


Amend ALL user's SMTPs

Hello everyone, We're having a bit of trouble at the moment within our businessUsing the Exchange Management Shell, i want to write a script which takes all the SMTPs for a mailbox, and...

View Article

Formatting output from psbase.InvokeGet

I can run the following script to get each user's name, FQDN's and RDS (Terminal Services) path.  If I pipe the script to an OutFile when I run it, I get a text file with these elements listed on...

View Article

Powershell script to reset TPMLockout

We have Windows 7 Enterprise laptops with TPM chips. We have deployed Bitlocker to these laptops. What I'm trying to accomplish is to write a PowerShell script to look up the msTPM-OwnerInformation...

View Article


Write-Progress display - How to get rid of it when complete?

This seems straight forward, but I haven't seen/found the answer...My progress bars hang around too long.  I would like them to go away when complete, but they don't always.Typically the Write-Progress...

View Article

How to run .cmd file from a Powershell script

Hi, I would like to know how I run commands from a powershell script? how to use the invoke-command?This powershell script doesnt work for meInvoke-Command C:\setup.cmd -ArgumentList install-setupforced

View Article

Most efficient way to consume log files

Hello everyone,I've been absent from the forums for awhile but I'm back at it now...  I have a question about the most efficient way to consume log files.  I read in Powershell in action, by Bruce...

View Article


How to disable Alt-F4 in a powershell form?

I've written a powershell script which displays a form using System.Windows.Forms. I've already disabled the control box and all other ways that this form can be closed via the mouse. But I can't find...

View Article


Comparing Folders, Sub Folders, Files by binary and copying the difference to...

Hi All, I have seen examples of using a Compare-Object  in powershell but it gets complicated for what i want to do, i have a rough idea how to use this; firstly i want to be able to compare NEW FOLDER...

View Article

RegEx to ID file path that uses Wildcard appropriately

I am looking for a Regex expression to identify paths with wildcards, but pilchards only allowed in the file name and extension portion of the path. So both of these should return...

View Article

uninstall program on remote machine -

All,I am trying to uninstall an application on a WYSE 32bit Windows Embedded device.  I am unable to use WIn32_product and have to Win32Reg_AddRemovePrograms.  I can query the device remotely fine with...

View Article

Issues connecting remote server using PSSESSION

Hi All, I need to execute powershell on servers behind firewall, i set server to use 8530 port (which we opened for patching) so i can reach DMZ server from Non-DMZ via 8530. Below commands Configured...

View Article


Powershell script to modify DNS not returning errors

I've modified a script to make DNS changes given a name/IP combo from a CSV file and it seems to be working, but is not throwing any errors (which I had thought it would do, but...

View Article

Auto-Increment Number for Server Audit

All,We have built an audit to verify server configuration and builds that our other Engineers are performing.  What we want to do is to be able to audit a farm of systems b y entering something as...

View Article


unpersistent drive mapping question

We have a large (200+) set of shares to map to various users based on group membership via PowerShell login script.  I am very familiar with the arguments for using GPP with item level targeting as a...

View Article

new-webserviceproxy and ssl

Hello everyoneI have been searching and have not found a method to use new-webserviceproxy that the url requries an ssl cert for auth.I have the cert installed in my local store and i can navigate...

View Article


How to create an collection/array/object/thingy from a bunch of objects for...

This is a follow-up to an earlier post (How to output a bunch of variables into a table.) Now that I can ouput data for a single computer I need to to do the same for a list of computers into a CSV. In...

View Article

add-pssnapin Microsoft.Exchange.Management.PowerShell.Admin

I have a script (below) that was designed to be used by people who do not have access to Exchange. The idea is to check if ActiveSync is enabled for the user, it gives the ability to enable or disable...

View Article

Previous object in a pipe

Hi,is it possible to get the name of the group in the table:Get-DistributionGroup | get-distributiongroupmember |ft alias, @{label='Test1';expression={$_.($_.name)}}THX and best regardsChristian

View Article
Browsing all 21975 articles
Browse latest View live


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