Windows 8 Account Picture
Hi, I would like to set the user account picture via PowerShell for a domain user.I've already tried to copy the accountpicture-ms to...
View ArticleApostrophe in OU in AD
Hi,I need to list all users from OU, just have code:Import-Module ActiveDirectory Get-ADUser -Filter * -SearchBase “ou=Users,# name,dc=company,dc=cz”Problem is, that my subfolder OU (company -->...
View Articleexport list of Group names listed in MemberOf property
Hi All,I need help writing a powershell script that will export a list of all groups listed in the MemberOf property of a specific group to csv or txt.I messed around a bit and tried the following...
View ArticleUse Command Line to Query a User's Workstation Logon Restrictions (Log On To...)
Hi,I'd like to write a simple batch file that will allow me to input a specific user ID which returns the computer name it is restricted to (as set in the "Log On To..." settings in Active Directory)....
View Articlescript to loop though a set of web pages
If I have a text file that has the URL's of some webpages, how can I write a PowerShell script to loop through them, and refresh the display when it displays one in a web browser?
View ArticleArp / Dos command format output
HiIm looking to run the arp command within powershell and format the output so I only see the mac addressesIve been trying for a while and gotten as far as arp -A | sort-object "Physical...
View ArticleHow to get ServerName,DataBaseName,DBSize,DBFreeSize using PowerShell.
Hi All,I want to get the ServerName,DataBaseName,DBSize,DBFreeSize using PowerShell.I will give the ServerName and DataBaseName in WebConfig File Based on the i have to get the Particular DB Used...
View ArticleError handling refinement
I am looking to refine my error handling a bit, and hoping for some best practice advice. What I have now, in this Network Location code, is a big Try wrapper on everything. This is working so far, but...
View ArticleHere string formatting
Probably a ridiculous thing to be annoyed with, but anyway...I am trying to be good about indenting my code appropriately, as it really does aid a lot in understanding program flow. However, tabs in...
View ArticleEvent Handler Between Reboot states using Powershell
Hi,I need some help writing an event handler for a powershell script that would meet the following requirement:1. Continue Upon a restart2. Continue Upon a sleep state3. Continue Upon a hibernation...
View ArticleExecute Powershell Script inside CMD file
Hi,I have a .cmd file which executes a powershell script. The powershell script removes Office 2010 shortcuts, links from desktop, start menu and taskbar. Below is the code inside my .cmd script...
View ArticleGet Sitecollection and Sub Sites Data Base Size Using PowerShell
Hi All,Currently i am getting the Site collection database size using this powershell$SiteCollurl = @{Expression={$_.url};Label="Site Collection URL"} $size =...
View Articleproper formatting
I'm trying to create an icon with PowerShell. For the Shortcut.Targetpath I need it to hold this value. "C:\Program Files\Internet Explorer\iexplore.exe" "http://mghmd.ourcompany.org/wsp" I've tried...
View ArticlePoweshell script to parse a XML document to get all Leaf level nodes with...
Hi Experts,I want to write a Powershell script to parse a XML document to get all Leaf level nodes with Node names in CSV<?xml version="1.0" encoding="UTF-8"?><CATALOG> <CD>...
View Articleget-childItem -include strange results
#files test.txt and hi.txt $usrInput = "C:\Temp\" $filterArray = "test*", "li*", "di" write-host ("filter array contains " + $filterArray) $uploadFiles = (Get-ChildItem -Path $usrInput -Include...
View ArticleBest way to start services one at a time?
We have a server with a bunch of Automatic services. we sometimes need to stop and restart them. The problem is they each can take 2-3 minutes to start and it kills the whole server if we do them all...
View ArticleCopy owners with robocopy using powershell.
Hi Friends.. I have created script to copy folder from one location to another location in PS. using Robocopy.. but By this script cannot copy the owner of the source location folder to destination.....
View Articlehow to retrieve group description column when pulling nested groups using ldap?
Hi, My current script i have to pull nested groups for a single user works great, except i would like to pull the descriptions for each group in a second column. I have no idea how to proceed. Any...
View ArticleAdd-ADGroupMember : A referral was returned from the server???
I'm sure I'm missing something here...All I want to do is add a user from a child domain to a universal distribution group in a parent domain. Sounds simple enough right? WRONG!Here is the example...
View ArticleOffice365 Bulk edit user contact info
Hello, I have to bulk update the contact info for several hundred Office 365 users. This will include things like phone numbers, title, etc. I'm sure there must be a way to pull this off with...
View Article