Scheduled Tasks & Signed Scripts
I'm looking into signing all of our PowerShell admin scripts and using "Set-ExecutionPolicy AllSigned". One of the tests I'm doing right now is to sign a script used in a scheduled task then modify it...
View ArticlePowerShell snap-in is not working
Hello Community Windows Powershell 2.0 and SharePoint 2010 is displaying the message: "The Windows PowerShell snap-in Microsoft.SharePoint.PowerShell is not installed on this machine. Windows...
View ArticleDuvida de criação de variável!
Bem estou querendo criar uma variável de ambiente via gpo para os meus computadores do domínio com esse atributo: ([adsisearcher]"samaccountname=$env:username").Findone().Properties['mail'] Como eu...
View ArticleError loading Virtual Machine Manager 2012 and Data Protection Manager 2012...
Hi. Very strange issue: when i try to load together Virtual Machine Manager 2012 and Data Protection Manager 2012 modules - script fails. If first loaded Virtual Machine Manager 2012 module:...
View ArticlePowershell script to identify users with large token sizes
Hello, We had some users that are not able to log in to certain applications. The affected users have been identified has having very large token sizes which are preventing logon to certain...
View ArticleCopying Group Membership from one user to another
I work for a large organization, with many thousands of users, and many hundreds of ActiveDirectory security groups. Quite often, when a user is reassigned from one enterprise unit to another, the...
View ArticleAn attempt to read in text from a pdf file
Hello together, My goal is to read in text from any pdf file which i can use for further evaluation. I've seen several approaches but most of them are in .NET, which leads me to my problem ... :-) I...
View ArticleActive Directory Remote Control Tab Change
Hello all, new to forums. Anyway, I am also new to powershell, I have just been picking up what I can from web searches for the goal I am trying to accomplish and that is automatic creation of new...
View ArticleCopy files cross domain
Hi. I need to copy a file from a server in one domain, to another server in another domain. I tried using the Copy-Item command specifying the -Credential parameter. But credentials are aparently not...
View ArticleAuto relogin after reboot
As the title says already. Is it possible, that the system automatically logs you in again after rebooting? Or is that locked or something.
View ArticleSending a big string directly as attachment in Email
Hi, What I am trying is to send a big-string ($myString) in an email directly as attachment (.txt file). I found a C# code. Trying to convert this into powershell. Just need suggestion on conversion in...
View ArticleSplit Multi Line String
I'm attempting to gather stats on the local ports of a server. I'm writing the output to a HTML file. The problem I'm having is that when my String contains, multiple lines wrapped, my script fails....
View ArticlePowerShell script to locate expiring AD accounts
powershell script to locate expiring AD account (like expire before 7 days) which can export the account name to a file. Not the password. Please help!
View ArticleHow to test for a given process every hour?
Task Scheduler could kick off a ps1 script at startup which would continually run an endless loop which would wake up once an hour to call Get-Process. If the process were not found then a...
View ArticleDisplayAlerts = $False is not working..
Hi guys, I have a VB script that I am converting to PowerShell. It basically refreshes some data from TFS (SQL Server Database). In VBscript I am able to suppress the message popup but in powershell...
View ArticleHow to logon to a domain to copy a file...
Hi all, I've been using a batch file, a mapped drive and manual login to the domain to copy two files from the server. I want to change this to a script. I'm stuck on how to login to the server though....
View Articleworking with -ErrorVariable, as well as success/failure of a cmdlet
I am making a WMI call to a list of servers gathered from AD to get DNS information. One problem I am running into, is some servers in AD are powered off (or otherwise unreachable), so there is an...
View ArticleExecution policy (I think) error.
I am starting the PowerShell and tried to execute the following command: PS C:\Scripts> Invoke-Command -ComputerName devbrain01 -Credential ASGARD\kevinb dir but I get the error: Invoke-Command :...
View Articleread file/ folder structure out of textfile
Hi, i have a textfile containing a folder- and file-structure that looks basically like this: &folder1#hash ~file1 #hash ~file2 #hash &folder2#hash &folder3#hash ~file3 #hash So every...
View ArticleSendmailmessage Create line break after body output
I have a powershell script which outputs the html results to the body of an email. The issue I have is that our application that applies our company disclaimer appears to be populating the disclaimer...
View Article