SQL database Recovery Model
Does anyone know why this doesn't work:$instancename = "CHIMNEY\UAT2012" $dbname = "TFS_DefaultCollection"Add-Type -AssemblyName "Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral,...
View ArticleRemove-ADGroupmember disable confirm prompt
Surely, I am missing something right? I am trying to remove users from a group using:Remove-ADGroupMember -Identity "GroupName" -member $User add it prompts me for each object. I will be scheduling...
View ArticlePowershell v2 - Add Row numbers to each row in Formated output
Hi All,Am trying to add numbering to each Row of the object output of the select command. As in belowGet-Process |Select ProcessName,Thread ac.sharedstore {1808, 1820, 1824, 1832...} accrdsub {3960,...
View ArticleMoving Home Folders of Disabled accounts
There are disabled accounts AD. ( windows 2003)I got the list of disabled accounts, some of them have home folder and profile some don’t have ll have.1: I want to 1<sup>st</sup> search...
View Articlelaunch process & recheck every 5mins
i would like to launch a process ( lets just assume its notepad or internet explorer,etc) but more importantly, i would like to recheck every 5 or 7 mins to determine the state of that launched process...
View Articlehow do i remove elements from this object (array?)
i am using following to read a file with 40000 line:# Read working file into an array # this file has ~ 40,000 employeeid - courseID pairs whith many-to many relationships $Array=import-csv -Path...
View ArticleCan PowerShell restore previous versions of files/folders via Volume Shadow...
We are working with MS Tech Support to determine why many of our students' home folders are being deleted on logon in Windows 7 and 2008R2. We are in the US, but there are other schools around the...
View Articleerror checking subroutine sometimes doesn't exit.
I've got a powershell script that runs an executable and checks the result of that executable. The executable logs to a sql server table. The ps1 script queries the table and is supposed to exit if...
View ArticlePowershell script to get all hyperv virtual machine allocated disk size and...
Powershell script to get all hyperv virtual machine allocated disk size and actual usage so that can monitor the capacity. TQ
View ArticleHow to write in Excel via powershell
How to write in Excel via powershellSupport@Mytechnet.me
View ArticleRunning invoke-command does not call executable in master script....
Ok here's the scenario.Domain-based network.Computer running invoke-command is also a domain member.Powershell v2 is installed on domain member computer.Powershell v2 is installed on the domain member...
View ArticlePowershell 3.0 Help cmdlet broken
I am running Powershell 3.0 On Windows 7 in German. So far it seems to be doing fine, but I just discovered that much of the inbuild help is really broken.For example: "help About_(anything)" doesn't...
View Articlethe AWESOME power of invoke-cmd
Invoke-command is one of the most useful features of powershell when managing multiple computers. But there are some issues with it such as trying to figure out which server came back with errors and...
View ArticleAD recycle bin and isDeleted attribute
Suppose a user is deleted.Somehow when I query this user, the isDeleted attribute has value as empty. (I don't know how it ends up like this.)In this case, can I use AD recycle bin to recover this...
View ArticleExport csv inside if Loop
Hello Experts , I have created a Powershell script which will query Active directory to list out all the windows server Operating system. Below is my script$a = Get-ADComputer -filter * -SearchBase...
View ArticleUnable to Add a member to a group
Dear All,We have all the domain Controllers (Parent and Child Domains) in Windows Server 2003 with Service pack 2 Operating System. I have Installed Powershell Version 2 in one of the Root Parent...
View ArticleRetrieving MSIEXEC exit code in PowerShell
I need to run an MSIEXEC command line from a PowerShell and check whether the installation was successful or not.If I do:msiexec.exe /qn /l*v e:/tmp/surfaceruntime.log /i...
View ArticleHow do i parse an empty space in the XML node i am trying to access?...
Hi Guys,Sorry for asking a noob question. I am trying to access the nodes. As you can see there is an empty space in "Software ID".How can i parse this through? (I am getting "unexpected token...
View ArticlePowershell to Create OU in AD and set proper permissions
We have around 50 OU's under which we need to create a OU called Testing. This is easy as I have all the information in a csv file and can import it.. Using AD powershellC:\Import-Csv .\OUCreation.csv...
View ArticleHow to pipe a file name into attribute
Hi, I have a script that sends an email with attachments. The script takes as its input an attribute that contains the file path of the file. Works great for me normally. The issue I have now is that...
View Article