PowerShell v3 ISE suddenly won't start
It has been running on Windows 7 x64 for months now. And I can still start the console version, but not the ISE or ISE (x86). Event Log says:Application: PowerShell_ISE.exe Framework Version:...
View ArticleRemoving entries from the administrators group on a remote computer with...
The client I'm working for recently split the business into two entities, and split the servers between them. To maintain continuity with access, they created synchronized group objects on the...
View Articlehow to protect a called program from powershell
hi all,i'm calling 4 processes which are all exe files and they keep on crashing frequently but if running it by clicking manually on the dekstop shortcut, it doesn't but this is manual inteference not...
View ArticleGroup Policy for Set execution policy Bypass?
Hello,i am looking for a GPO-solution to set the execution policy to bypass.What can be done to achieve this?Thx
View ArticleExport WSB-logs using PowerShell
Hello,i am trying to find a solution to export the Windows Server 2008r2/2012 Windows-Server-Backup logs WITH content of the message to a .txtI have found this :Get-WinEvent -logname...
View ArticleDoc and Setting folder total
Good Afternoon I have this script$location ="\\$server\C$\Documents and settings\" $servers = get-content C:\scripts\servers.txt foreach($server in $servers){ $users = gci $location} $colItems =...
View ArticleHow to use Set-Acl to a file with square brackets ([])?
I am running a block of scripts to change the ownership of files and folders to the user. The script works great but it fails to do so with any files containing a square brackets. The codes are as...
View Article"Disk Cleanup" like PowerShell script?
I'd like to use a PowerShell script that does the sorts of disk cleanup as the GUI "Disk Cleanup". How can I script that?
View Articleodd thing occuring with variables and write-host
In the following code, I assign a write-host statement to a variable. I should then be able to call the variable and then execute the write-host statement. Simple enough you say, right? Not so fast my...
View ArticleInteroperability of PowerShell
Hello I am distributing an installer and it will open and run a PowerShell script. The installer will be used by people who have Windows XP and up. Am I guaranteed that this script will run/execute on...
View Articleprofile in power shell
when I created a profile (a profile.ps1 in the C:\Users\nashua\Documents\windowspowershell) and every time I start the power shell the profile is excuted but when I issue the command Test-Path...
View Article[Switch] parameter on script level
I can find how [Switch] parameters are defined and used in a function, but couldn’t find how to do it on the script level. E.g. how would Recurse be handled in “dir -Recurse” if dir were written in...
View ArticlePowerShell Assign Permissions on Folders
I’m writing a big account creation process using PowerShell which includes:Creating AD UserAssigning Different GroupsCreating Multiple Folder in different FileServersAssigning special permission for...
View ArticlePowerShell Out-String formatting
Hello,Question:I wrote that little script to remind me every month of Group policies I can delete.Everything is workin, the only thing is I would like to have the Output (table) formatted in the mail....
View Articlenot checking each server
clear-host $VerbosePreference = "continue" $bansifile= "desktop/result.html" $global:servers = "BAL-DC-01" , "BAL-NODE-01" , "BAL-NODE-02" IF (Test-Path $bansifile) { Remove-Item $bansifile } $tno =...
View Articleif and Send-MailMessage not work
Hi everybody, I want get the name list that no OCS account from smtp, but not work, code as below, when run it, it show this, not comtinue...>> Please help enable OCS account for below...
View ArticleCreate Team Foundation WorkItem with PowerShell
Hello,I want to create a work item from type task when a build quality is changed to a special value.How can I do something with powershell? I hope somebody can help me and bring me on the right way to...
View ArticleCannot pass vairables to Invoke-SqlCmd
Hey Guys,I've about 180 MDF (and LDF files) in a folder and I'm trying to automate the creation of SQL databases from these files.I've tried to use the Invoke-SqlCmd, but it doesn't seem to interpret...
View ArticleMapping, strange issue with the Windows Server
This thread comes from here. I just tried to split it up because the actual question there has already been answered.Whatever, forget New-PSDrive cmdlet. I tried it out with mapping. Here's my new...
View Articlelist sessions on the remote end
Hello,after lunching the command new-psssession on a client computer what exactly happens on the remote end ?is a new powershell process lunched that will whait for commands ? (i didn't see any); is...
View Article