Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Browsing all 6937 articles
Browse latest View live

Mouse pointer position

I am clueless about all this stuff. Lets just make that clear. What I am trying to get, is a way to make my mouse pointer jump to specific coordinates assigned to hotkeys.Say 1 - 6 on the Num pad. The...

View Article


Run batch file in specific user session (no PSExec allowed)

I've one user logged in a VM, with 3 sessions opened (sessions 2, 3 and 4). I need to run a batch file in specific session, e.g.: 'C:\test.bat' in session 2.I'm already doing this with PSExec, but I...

View Article


Continuing PowerShell Script when unable to connect to server

I am trying to stop and disable a service on a list of servers. I have the following script, but the problem is when the script gets to a server in the list which it can't connect to, it hangs up and...

View Article

Can powershell create network shares from an excel spreadsheet

So I've got a ton of network file shares, folders, I need to create and I have them all sorted into different columns within an excel spreadsheet like so:Column A           Column B...

View Article

Flush DNS Cache

Hi All,I'm writing a tool for a company I contract for. DNS updates here are very sloooooow...I need to flush the DNS cache on the local machine before attempting to contact DHCP clients.I know that...

View Article


Azure Data Center Migration Solution 1.0 Released

Microsoft and Persistent Systems have rolled out an Azure Data Center Migration Solution 1.0 tool.Read More

View Article

Call Interactive Console Application from PowerShell

Q: I'm trying to call a console application from PowerShell in the PowerShell Integrated Scripting Environment (ISE), but applications that require user interaction don't work; why?A: Interactive...

View Article

modifying the color of multiple lines for write-output

hi friendsi have written the following code at the beginning of my script :write-host "1- first App1 must be installed " -Foreground yellowwrite-host "2-n`check you have copied your custom MMC console...

View Article


Add-ADgroupmember from child domain

No problems adding a user from current parent domain.  I can't figure out how to add a user from child domain to universal group.

View Article


How to get permissions to AD attributes

Given the SamAcountName and the Attribute name, is there a way to get the effective permissions that the running user context has for the Attribute on that specific AD account?  A bonus would be to...

View Article

Sort a dynamic Range in Excel with Powershell

So, i've done a lot of searching and i've come up empty... I use a lot of excel within powershell, but i've never done dynamic sorting.Here's the snippet from the macro."    Rows("1:582").Select...

View Article

script fo monitoring windows uer accounts

Hello, i need a little help.Can someone show me the way with script how to monitoring windows user accounts.In particular i want to receive an email if new account has been created or if password for...

View Article

wanting to see computername, print spooler status however not getting all info

I want to run a powershell command which displays computername (it currently does not) status of spooler, name of service-spooler, get-adcomputer -filter 'name -like "*equ*"' | foreach {get-service...

View Article


unable to access domain gpo from a member server

I am trying to access citrix domain gpo on citrix server itself but no luck.. New-psdrive -name citrixpolicy -psprovider citrixgrouppolicy -root \ -domaingpo "ctx_policy"

View Article

Have IP addresses need to find ad Name and AD Description

              Hello,I'm trying to get the AD name and Description into a CSV file.I can put the WMI name into a txt file but it's bringing in the column name for every computer...

View Article


Error get-wmiobject win32_battery

> get-wmiobject win32_battery get-wmiobject : Invalid parameter At line:1 char:1 + get-wmiobject win32_battery + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Get-WmiObject],...

View Article

Using Put() method failing for some reason

Hey everybody, fairly new to the forums and I have a question wondering if someone is able to help out.  I built this script for changing the Network adapter name based on IP address (lots of help from...

View Article


Find enabled users in a given mailbox database

Get-Mailbox doesn't take parameter that filters by enabled/diabledGet-ADUser doesn't take a parameter that filters by mailbox databaseI triedGet-Mailbox -Database db02 | Get-ADUser -LDAPFilter...

View Article

import users from database into active directory group

Trying to write powershell script to populate a group of users on a specific databse to an Active Directory group.  User in the database are in a child domain, the parent domain contains the group. I...

View Article

want to get computername, service spooler, status of spooler

I am not getting the output that I wantMy scriptget-adcomputer -filter 'name -like "*equ*"' | foreach {get-service -servicename spooler}Status   Name               DisplayNamerunning  spooler...

View Article
Browsing all 6937 articles
Browse latest View live