Powershell script to batch update homedirectory user attribute data to...
Hi all, I have been searching forum posts and although my need is simple, I'm obviously missing something basic. What I need to do is update users who currently have their homedirectory mapped as such...
View ArticleCreating an XML element strips characters from the element
Hi, I'm trying to create an XML file (actually an InfoPath form) using powershell. When I create an element, I'm not getting the expected output. Here's my code snippet: $node =...
View Articlehelp!!!!!!!!!!!!!! on ACTIVE DIRECTORY GATEWAY MANAGEMENT SERVICE
YELO....I SERIOUSLY NEED HELP ON WHAT ADGMS IS AND HOW DO I USE IT IN WINDOWS SERVER 2008uzygr8
View Articlehow to install and use powershell modules in windows server 2008
hai....am running a window server 2008 domain controller and want to administer my domain using powershell cmdlets but can't figure out how to install the powershell module or even use the...
View ArticleCreate AD Users from Word or Excel Form
Is it possible to use an Excel spreadsheet or Word document with Powershell to create a new users including default password, home folder, appropriate group membership, and possibly mailbox creation?...
View Articledeclaring variable confusion
I have had a few head scratching sessions with variables not being the type that I thought they were. $myDate = Get-Date does not always yield a date type for me. Sometimes it yeilds type string for...
View Articletrap / no trap
A full understanding of error catching in PS continues to elude me. It is not cut and try like in c#.net. What is going on here??? this works as expected "caught my error shows up" is written when...
View ArticleSQL query into an array
Hi, I am trying to write a powershell script to read some values out of a database and then put them into an two dimension array. My SQL query will return: User, Group User a, Group 1 User a, Group 2...
View ArticlePowershell has stopped working - File Server Migration
I am trying to migrate a 2003 x86 File and Printer server to R2 x64. I am using the Windows Server Migration Tools included with R2 and I am using the one step copy procedure described here...
View ArticleError with ADSI adapter
Simply put the problem I have is, for a few users in AD If I do the following $U = [ADSI] 'LDAP://CN=Smith\, John,OU=Users.......' I get a terminating error format-default : The following exception...
View ArticleSend mail from batch file
I need a sanity check on this please. If i run the powershell script though the powershell editer i get 2 emails as expected. But if i run the script though the batch file i only get the first, even...
View ArticleHow to stop Invoke-Command requiring credentials to invoke on remote machine.
I'm fairly new to powershell remoting and I'm trying to invoke a comment remotely: Invoke-Command -ComputerName $computer -ScriptBlock { (Get-Process notepad).Kill() } And I get an error: Connecting...
View ArticleSpecify a server during an [ADSI] command
Function Get-ADObjectOU { # ---------------------------------------------------------------------------------------------- # Function outputs the Objects containing OU # - Requires Distinguished Name...
View ArticleList Remote Software
Guys. If I run code #Code 1 on my local machine then it gives me really nice information about the installed software. From what i can see you cant use Get-ItemProperty to connect to a remote machine...
View ArticleSet-ADUser cmdlet and -AccountExpirationDate
$Expires = $null Set-ADUser -Identity $DN -AccountExpirationDate $Expires Error I get: "Set-ADUser : Missing an argument for parameter 'AccountExpirationDate'. Specify a parameter of type...
View ArticleEdit folder redirection with powershell in windows server 2012
Hi powershell experts... Is it possible to edit folder redirection in group policy with powershell in windows server 2012? I have searched around and it doesn't look good. Installed Server 2012 RC but...
View ArticleHow to switch current user in the Powershell?
I have powershell (SharePoint 2010 Management Shell) and I need to change to different user so that I can execute certain STSADM commands. This user is not the administrator of the Windows Server. How...
View ArticleHow to obfuscate a string into a numerical representation - Like Mjolinor does
I saw Mjolinor's signature and thought something hanky is going on. So I dropped it into a Powerskull window and got his email address. Please teach me the opposite of this snippet so I may...
View Articlecopy-item bag?
Hi. When I manually run the script - it works properly. $path = Get-Item E:\_backup\ $dist = Get-Item S:\_backup\ copy-item -path $path$date -destination $dist -recurse -force But, if it run from...
View ArticleSQL Query
Hi Guys. So i have this Powershell SQL query that i have been building up. This script connects to two seperate SQL servers and performs a SQL query looking for example a userid ABC. Right now at the...
View Article