Quantcast
Channel: Windows PowerShell Forum
Browsing all 2562 articles
Browse latest View live

Outlook 2013

I had a bunch of scripts that are no longer working. For example the one at the url below. Does anyone have any information on changes in powershell scripting against office...

View Article


How to remove a domain user from a group in other domain?

Hi, I need to remove all groups from a domain user with powershell. The user belongs to groups in other domain in the tree. When I use "Remove-ADPrincipalGroupMembership" connected to user domain, it...

View Article


Combobox doublclick or afterupdate events in powershell

Hi,I have designed one form in powershell that contains a textbox and a combobox. I want to display value selected in the combobox in the textbox as soon as the item from the dropdown list is selected...

View Article

Add-Computer fails with -server switch

Hello. I need to join computers at a branch location to the domain, and all they have available is an RODC.I have the following script:$User = "domain.local\domainjoinaccount" $Pass =...

View Article

Subtracting script

Hello guys, I am trying to write a script that counts down any number a user puts in.Write-Host "$Value1" [int]$Value1 - [int]1 do { $outputString = read-host $outputString - [int]1 } until...

View Article


>> Symbol in powershell.exe console

This seems like an easy answer, but i cannot find it anywhere. What is the >> symbol and how do you exit from its block to get back to the original PS directory command line?It looks like...

View Article

Microsoft Office Access database engine cannot open or write to the file ""....

Having a weird issue with opening an access 2007 file that exists on a network UNC path, from powershell. I've checked that no one else has the file open and that the process account has the required...

View Article

Retrieving info for list of users

hey there,We're currently working on a forest migration.  samaccountnames match between source forest and target forest.  I've exported a set of users from target to csv, csv is formatted properly,...

View Article


Enable-PSRemoting is failing

Hi There,I’m getting the following error when I try to run the Enable-PSRemoting cmdlet:The WinRM client sent a request to an HTTP server and got a response saying the requested HTTP URL was not...

View Article


Powershell can not find drive even though it is available on system

I am using Powershell v3 to map up SAN storage to Server 2012 and partition, format volumes, bring them online, and copy data to them. This works well except when it doesn’t...Sometimes, although a...

View Article

Optimize command

Hi i'm pretty new to Powershell and need some help if there are a more optimal way to make this code:gwmi -Namespace root\hpq -Class HP_NumericSensor | ? {$_.Name -eq "Temperature Sensor 1"} | %...

View Article

Appending to pre-existing csv via Export-csv switch

How do you append to a CSV file which already exists without overwriting the initial data?  Essentially, I want to write PowerShell code to append data to an existing CSV file or a building a new CSV...

View Article

Deploying software to a remote machine

#Getting information$Computers = Read-Host "Enter Location Of TXT File" $Source = Read-Host "Enter File Source" $Destination = Read-Host "Enter File destination (windows\temp)" Get-Content $Computers |...

View Article


Using Powershell to create an exe to run as a service

Can powershell be used to create an exe? I have a simple task of moving files from one drive to another, but we need an exe to run the task as a service to meet our monitoring and notification...

View Article

How can I perform a User Account Logon/Logoff in a Powershell script?

Hello,I'm building a Auditing regression test script in Powershell which we perform in our domains to validate auditing is working correctly.  I would like to perform in this script a 'logon/logoff' of...

View Article


Change Owner Script

Hello All! Over the past couple of months, I have been trying to figure out a way to point our users Local profile, to their soon to be, Domain profile. After lots of research, the Change Owner method,...

View Article

"ArrayList.Add" displays index number of line added. Why?

Creating an object of type ArrayList and adding an element to it using ".Add" causes the index number of the line added to be displayed on the output screen. Why is this the case?Example:[void]...

View Article


Defining Custom Outlook Rules using PowerShell

I have a situation where I need to define the custom outlook rule .Basically , we use HP Openview to monitor thousands of servers and we get loads to alerts about their status.I am responisble for few...

View Article

Remove Multiple SMTP address

Hi Guy's,I've found a script and modified it so i can specify which smtp addresses to remove. The trouble im having is this script removes all the smtp addresses rather than one ones i specify in my...

View Article

Array to Special format

Hello Experts, I have having a array of data which I need to convert to below format$a is an array$b = @('$a[0]','$a[1]','$a[3]'............)I know @() itself is a , but I am in a mid of building...

View Article
Browsing all 2562 articles
Browse latest View live


Latest Images

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