Exception calling AppActivate
Hi All,
I have written a script to uninstall the Net Time service from a computer. The script is giving me desired result, but throwing error.
$exe = "C:\Program Files (x86)\NetTime\unins000.exe" Add-Type -AssemblyName 'System.Windows.Forms' $ID = (Start-Process $exe -PassThru).id Sleep 1 Add-Type -AssemblyName Microsoft.VisualBasic [Microsoft.VisualBasic.Interaction]::AppActivate($ID) [System.Windows.Forms.SendKeys]::SendWait("No~") error I was getting is
Exception calling "AppActivate" with "1" argument(s): "Process '{0}' was not found." At F:\powershell\Function\get-exe.ps1:7 char:1 + [Microsoft.VisualBasic.Interaction]::AppActivate($ID) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ArgumentException I have confirmed that that the ID of the process is correct from task manager.
- Changed type Bill_Stewart Friday, July 7, 2017 7:11 PM
- Moved by Bill_Stewart Friday, July 7, 2017 7:11 PM This is not support forum for third party software
Reply:
You can't do that as you can now see.
You can only use a correct uninstall string,.
Check the registry for the uninstall string and contact the vendor for instructions on how to use their uninstaller.
\_(ツ)_/
------------------------------------
Reply:
------------------------------------
Reply:
AppActivate cannot find the process you are looking for. Why use it?
You have to understand installer technology. The EXE is not the installer it is a stub that places a request to the system installer. All prompts that happen are from the system and not from the EXE> The exe likely just starts and exits after it send the message.
To suppress all message you need to add parameters to the uninstall command such as "/quiet". Ask the vendor for their quit uninstall parameters or look up the command in the registry.
\_(ツ)_/
------------------------------------
Reply:
You need to ask the vendor of your package how to do a silent uninstall. That is not a question we can can answer for you in this forum since we didn't write that installer.
-- Bill Stewart [Bill_Stewart]
------------------------------------
Moving the Windows Server 2012 R2 with boot files to a new Hard Drive
Moving the Windows 2012 R2 system and boot files to a new Hard Drive
Motivation
My home business server is running Windows Server 2012, on an Intel i3 2<sup>nd</sup> gen chip, with 8Gb of RAM and a very old Western Digital SATA I hard drive. The hard drive had a capacity of 75Gb. With only Windows and Server applications installed on it (all application content was on other attached drives), the capacity in use was just over 50%. However, it was generally a slow running box, and boot up times were quite long compared to its brother box (faster CPU, more RAM and SATA II boot drive). Although it runs 24/7, there are times of course that it needs to shutdown and be restarted. When it's me that does this, it is annoying waiting so long for it to restart. Time wise, it's about 15 minutes before it's usable.
When Microsoft released Windows Server 2012 R2, I upgraded this box to the newer operating system, and in doing so endured one too many restart waits. So I set out to move off the old hard drive and put Windows onto a new, SATA III Hard drive. I purchased a Seagate SATA III SSHD 1Tb drive, which has an 8GB SSD file cache. Not that I expected a great benefit from the cache, but because it wasn't much more than one without, and if I did get some benefit then that's just a bonus!
Desired outcome
As this box, slow as it is, is one of a pair of servers I run at home (it's my home business & my hobby!), I have made them both Windows Domain Controllers (DC), and this DC was the first one built (primary DC in old terms), so I wanted to move Windows to the new drive rather than install Windows and applications from scratch. I could have done the clean install, but honestly it'd be quite complicated and a lengthy piece of work. My preference would be a "simple" move of existing content to the new drive, then a restart would have Windows booting from the new drive!
Actual outcome
I was able to move Windows onto the new hard drive very easily, with a backup and restore.
The boot time from button press to a usable state was significantly improved to just under 3 minutes (2:53s). Usable for me is logged in, at the Desktop and ready to launch an application.
Approach
I did a lot of research on the net to determine how to move Windows and applications to the new hard drive, but didn't find any easy method, with the tools and applications that I had on hand. I wanted something that would be as easy as a file copy and a configuration change. No luck with that!
So I decided to do a Windows backup and restore. After all, I figured that restoring Windows onto a new drive may well have been required had the old WD drive packed up. At least I had the benefit of the original drive if the new one failed to restore.
Method
Here are the steps that I took to move Windows and applications onto the new hard drive.
- The Server has two active hard drives; C: (boot+Windows system+Applications), D: (Application and User data)
- In Windows Server (2012 R2), run Windows Server Backup
- Choose Backup Once – from the task pane on the right hand side
- In the Backup Once Wizard now, Different Options – so I could run the backup immediately and to a custom location
- Custom – to choose the volumes and settings
- Add Items –
- Bare metal recovery,
- System state,
- Local Disk (C:)
- and as this box has Hyper-V instances, Hyper-V (expand to see) Host Component
- I didn't need to choose the Hyper-V instances as these are stored on the other hard drive (D:) and the restore of Windows and Hyper-V manager will have Windows use the existing data files. Of course, the risk is that this doesn't happen, but I already had these backed up and replicated the Hyper Vs to my other box.
- Local drives – I chose to store the backup on D: so when I do restore from D:, the restore process blocks D: from being an optional install target, meaning that D: couldn't be accidentally reformatted during installation.
- Backup destination D:
- Confirmation – confirmed as okay
- Backup commenced
Create a bootable USB drive
- Using an 8Gb USB memory stick (could have used a 4Gb it turns out!)
- Download the Windows 7 USB/ISO application, on my laptop (Windows 8.1), I located the Windows Server 2012 R2 ISO file, and then have the application make the USB bootable, and it copies the ISO contents over to the USB drive.
- This USB drive will be used to boot up the server with Windows in Repair/Restore mode.
Once the backup has completed,
- shutdown the server
- open the server case
- disconnect the cables from the old hard drive
- install the new hard drive
- connect the new drive using the disconnected cables
- I tried originally to use a different SATA connection on the motherboard, but Windows Recovery wouldn't restore to the drive on that port.
- Leave the D: drive attached, as it has the backup files
- Plug the USB drive into a spare USB port on the server
- Start the server and have it boot from the USB drive (mine did this without a BIOS change)
- When Windows is running with the Install screen, there's an option on the bottom left to repair your computer, choose that.
- Then, select to restore using a system image. Note that the time on the backup will be UTC adjusted to US time. This caused me some confusion and panic, as I am +10, not -8 from UTC so that's an 18 hour difference in times displayed (and with the date being the previous day, it was like I was using yesterday's backup!).
- Choose to exclude all drives except the new hard drive to restore to.
- Note that the D: drive is not an optional target for the restore as it holds the backup.
- Also note that the USB drive is one of the targets. Make sure the USB drive is marked not to be used to restore to. So the new drive is the only choice for Windows to restore onto - it is the only one not checked on the exclude disks window.
- Run the restore process (this was a lot faster than doing the backup)
- Remove the USB drive during the restore. It's no longer needed.
- Reboot once the restore has completed.
- The server will boot from the new drive, and all applications will be working as they were on the old drive.
Following first start up
- After logging in, and doing a quick verification that all is normal, launch the Disk Management utility (right-click on the white Windows icon, bottom left)
- The restore process made a partition the same size as the original (old) drive.
- The remaining space on the new drive could be turned into a new partition(s), or as I didn't need another partition, I extended the existing small partition all the way out to full disk size. This is done by right clicking the small partition and choosing extend.
Outcome
Once all these steps are done, I have successfully moved Windows Server onto the new drive, speeding up the boot time significantly. All applications, active directory domain content and Hyper-V instances started successfully and without any changes at all.
Now, I think I might just upgrade the other server too!
ROLE BASED ACCESS IN SHAREPOINT 2013
Hi every body,
I am totally new to the Sharepoint / microsoft technologies. I am using EPM tool built on Sharepoint & MS Project Server. The implementation of RBS (Role Based Access) in EPM tool, as there is no proper login / logout mechanism with proper session management. Session is found live even after logging out of the system. It is observed to mandatorily close the browser to kill the session, how far it is justifiable to close the browser everytime.............. Please guide me to implement any other alternative way of proper role based access control in sharepoint / MS project server.
Reply:
------------------------------------
Azure login issue - trying to create a web to run PowerShell commands
Hello
I'm trying to create an asp.net site to run specific commands for non-techies.
I can log in to Azure, but after that I try to run a command and I receive this: "Your Azure credentials have not been set up or have expired, please run Login-AzureRMAccount to set up your Azure credentials."
This is basically how I'm doing it:
using System; using System.Collections.ObjectModel; using System.Management.Automation; using System.Management.Automation.Runspaces; using Microsoft.PowerShell.Commands; using PowerShell = System.Management.Automation.PowerShell; using System.Management.Automation.Host; namespace keepPSSessionOpen { public partial class WebForm2 : System.Web.UI.Page { static Runspace runspace = RunspaceFactory.CreateRunspace(); static Boolean loginResult = false; protected void Page_Load(object sender, EventArgs e) { PowerShell powershell = PowerShell.Create(); powershell.Runspace = runspace; String loginScript = "(Select-AzureRmProfile -Path 'C:\\Users\\dimas\\Source\\Repos\\runPSsite\\slnSite\\slnSite\\PS\\profile.json').Context.Subscription.SubscriptionName;"; String getvms5029 = "get-azurermvm -resourcegroupname rg5029; $error;"; powershell.AddScript(loginScript+ getvms5029); if (runspace.RunspaceStateInfo.State != RunspaceState.Opened) runspace.Open(); Collection< PSObject> getvmsresult = powershell.Invoke(); } } }
and getvmsresult is this (from the Immediate window with a breakpoint):
getvmsresult Count = 2 [0]: {mySubscription} [1]: {Your Azure credentials have not been set up or have expired, please run Login-AzureRMAccount to set up your Azure credentials.} [0] returns what is expected: the subscription name.
However, the second command in the script is telling me that I am not logged in. Just to be clear, it's like running this in PS:
(Select-AzureRmProfile -Path 'C:\\Users\\dimas\\Source\\Repos\\runPSsite\\slnSite\\slnSite\\PS\\profile.json').Context.Subscription.SubscriptionName; get-azurermvm -resourcegroupname rg5029; $error;
Any suggestions are welcome, like not using runspaces and something else instead. I want to avoid, if possible, having to log in for every command that's issued.
Thanks
Dimas
- Changed type Bill_Stewart Friday, July 7, 2017 7:10 PM
- Moved by Bill_Stewart Friday, July 7, 2017 7:11 PM Off-topic
Reply:
You will need to post your issue in the Web developers forums.
By nature a web site is stateless. Each click of a link or control will re-establish the connection and perform the task.
Post here to learn how to write "stateful" programs for a web site: http://forums.iis,net
\_(ツ)_/
------------------------------------
Reply:
I understand your point.
However it doesn't apply here. Before doing this, I tested with the following PS code, with its output tied to a textbox
"\$a: $a"; $a = get-date; get-date;
and the first page load would yield something like
$a: 06-jun-2017
and then, on reloads, what was expected:
$a: 06-jun-2017 06-jun-2017
I believe this is so because I made the runspace static, and I'm always running
powershell.Runspace = runspace;in order to use that one and not a new one.
------------------------------------
Reply:
-- Bill Stewart [Bill_Stewart]
------------------------------------
Reply:
------------------------------------
Reply:
This is about how to use a runspace, or what to replace the runspace with, not about web... Or do you think web devs in general have any idea of what a runspace is?
A good web dev knows how to set up a decent C# aspx page and how to use threading. A runspace is just an advanced away to create a thread.
You may also have to learn more about how a web site has to be configured to support what you are trying to accomplish. There are also many add-ins for web sites that allow PowerShell scripts to be run.
Here is one example: http://jeffmurr.com/blog/?p=142
You will also have to fight your way through he restrictions imposed by Azure. Post in Azure developers forums for help getting the setup correct for a web site hosting PowerShell. I recommend no using Azure logins but use web logins and a restricted PowerShell session.
\_(ツ)_/
------------------------------------
Prerequisite check failed Config Manager 1702
I am Running Server 2012R2, I have configuration Manager 1702, and I am trying to install "Configuration Manager 1702 Hotfix Rollup (KB4019926). I am receiving "Prerequisite Check Failed".
In monitoring, It "completes through "Download" and "Replication" and in "Installation" it only has "Extract update package" as completed, everything else is listed as "Not started".
CMUpdate.log says "There is no pending update package to be processed".
Any suggestions on what I can try?
- Edited by gsc73 Thursday, June 8, 2017 6:45 PM
- Moved by Jason Sandys [MSFT]MVP Thursday, June 8, 2017 7:06 PM
Reply:
> "I am Running Server 2012R2, I have configuration Manager 1702"
No, you aren't running 2012R2. 1702 is a version ConfigMgr Current Branch and has nothing to do with 2012R2.
Have you checked the prereq log file in the root of the C drive? cmupdate.log doesn't come into play until the update has actually been initiated.
Jason | http://blog.configmgrftw.com | @jasonsandys
- Edited by Jason Sandys [MSFT]MVP Thursday, June 8, 2017 7:05 PM
------------------------------------
Reply:
------------------------------------
Reply:
You're right, sorry, I get a bit zealous about folks not knowing the name of the product they are using.
For the ADK make sure you use 1607 or 1703 and that you uninstall the current one first.
Jason | http://blog.configmgrftw.com | @jasonsandys
------------------------------------
Reply:
Kamala kannan.c| Please remember to click "Mark as Answer" or Vote as Helpful if its helpful for you. |Disclaimer: This posting is provided with no warranties and confers no rights
------------------------------------
Reply:
------------------------------------
Reply:
I was able to update after I installed the ADK for Windows 10.Thank you for pointing me to the correct log "configMgrPrereq".
------------------------------------
Trimming Strings - Microsoft, please change your documentation
Good afternoon, one of the PowerShell tips in the technet article "Windows PowerShell Tip of the Week" (https://technet.microsoft.com/en-us/library/ee692804.aspx) is misleading and I'd like to suggest an alternative wording/method in the specific section below:
Bonus Tip: Removing Characters From the Beginning of a String
Consider a folder containing a bunch of files similar to this (a sight familiar to digital camera users):
HIJK_111112.jpg HIJK_111113.jpg HIJK_111114.jpg HIJK_111115.jpg Suppose you want to remove the HIJK_ prefix from each of these file names. How can you do that? Well, here's one way, using a string value instead of a file system object and file name property (although the approach is exactly the same):
$d = "HIJK_111112.jpg" $e = $d.TrimStart("HIJK_") For the above example, I would hesitate to introduce trim to readers in this way. Without explaining how trim works this could lead them to a dangerous assumption that TrimStart is considering "HIJK_" as a pattern when really its considering each character individually when trimming and only stopping when it reaches the first non-matching character in the string. The best use case for trim in my opinion is removing spaces from the start, end, or both sides of a string. Beyond that things can get dangerous, and I would suggest a method less prone to error when looking to remove a pattern such as a specific word or ordered prefix/suffix.
The example below illustrates how you could get into trouble with the method described in the article if you don't know the details of how TrimStart works:
$d = "IKJ_KJJKL__111112.jpg"
$e = $d.TrimStart("HIJK_")
Results in $e equaling:
111112.jpg
I would suggest explaining how trim works a little more or offer a better solution to trimming a pattern from the beginning of a string utilizing a Replace with a dash of Regex rather than a TrimStart:
$d = "HIJK_111112HIJK_.jpg"
$e = $d -replace "^HIJK_", ""
Results in $e equaling:
111112HIJK_.jpg
The ^ indicates the start of a string. In my opinion replace is a much safer solution to the problem proposed in the example.
Thank you for your time, consideration, and all the help you've given me with your articles over the years.
Reply:
- Edited by jrv Friday, June 9, 2017 6:01 PM
------------------------------------
Reply:
I sent it to scripter@microsoft.com months ago. no reply. didn't get updated so I thought I'd try here.
- Edited by Andy Leibundgut Friday, June 9, 2017 6:25 PM
------------------------------------
Reply:
-- Bill Stewart [Bill_Stewart]
------------------------------------
The type must be common langage specification (CLS) compliant - help!
Hi, I'm still pretty new when it comes to interacting with engines, and methods with Powershell, so please bear with me.
I'm trying to call a certain method by passing the simple parameter it is requesting: a string. It must be a string selected from a certain dictionnary. This is the error I get.
I'm trying to figure out the proper solution for this kind of problem. I looked around online, and I found some examples about $update.Invoke, and other similar examples, but I couldn't find how to apply it to my problem.
Thanks for any help.
Phyziik
Reply:
Try - $TBOProxy.EntityManager.CreateBO('Camera')
The error says it is wrong due to "case".
Check third party documentation for keyword case and exact strings.
\_(ツ)_/
------------------------------------
Reply:
The problem here is not the parameter that I'm passing, it's the cls Compliance of the back end. They coded 2 different properties, one called PtzCapabilities and one called PTZCapabilities. Their C# is case sensitive, not my powershell. So when I call that method, I get this error because the two PtzCapabilities properties clash.
I'm trying to find a way to fix, avoid that problem. I will specify that I have no access to the backend
------------------------------------
Reply:
Did you try my suggestion? The issue is "case". You need to supply the exact "case" for the token.
Since you are dealing with a third party issue you need to post in their forum or contact them to learn how to use the API. The backend has nothing to do with this. It is a Web service and is compliant to web service demands. The proxy will handle all of these issues as long as you comply with the API requirements. We cannot know what they are.
PowerShell is "case aware" and "case preserving". It does not change case anywhere. If you type mixed case it is maintained across all boundaries.
None of this has anything to do with PowerShell or web service usage.
\_(ツ)_/
------------------------------------
Reply:
The entity type is what is asked for and not a string. The type is likely:
[Genetec.Sentinel.DSProxy.BO.BOEntityType]::Camera
OR
[Genetec.Synergis.Common.Enumerations.EntityType]::Camera
Post in the vendor forum for more exact information.
\_(ツ)_/
- Edited by jrv Friday, June 9, 2017 6:47 PM
------------------------------------
How many users have been affected by the MEMZ trojan?
NOTE: This also applies to Windows XP through 8.1.
I've heard of this one malware called MEMZ, created by YouTuber Leurak for danooct1. When I discovered this information on the Malware Database at Wikia, I learned that the destruction of MEMZ was so severe that it could lead to an unusable machine. So let's give it an overview.
Stage 1
Leurak believes that the program is malicious, so once the program is executed, it displays the following warning:
"The software you just executed is considered malware. This malware will harm your computer and makes it unusable. If you are seeing this message without knowing what you just executed, simply press No and nothing will happen. If you know what this malware does and you are using a safe environment to test, press Yes to start it. DO YOU WANT TO EXECUTE THIS MALWARE, RESULTING IN AN UNUSABLE MACHINE?"
Clicking Yes will warn the user once again, and as long as the user chooses to start MEMZ, it infects the computer, leading to the next stage.
Stage 2
Once the user confirms to start the malware, it overwrites the MBR and generates a text file reading, "YOUR COMPUTER HAS BEEN @!&$%# BY THE MEMZ TROJAN," indicating that their computer is infected with MEMZ. Payloads are then executed.
The first payload opens random webpages and Google searches, most of them which are almost inappropriate. Around 2 minutes later, the second payload is activated, which plays erroneous system sounds in the background. The third is activated around 1 minute later, causing the screen to invert colors. In the fourth payload, random dialog boxes start to open, which read, "lol: Still using this computer?" Error and exclamation icons are then trailed while the mouse pointer is moving in the fifth payload. The sixth payload causes the text to be flipped, which can confuse the infected user. The seventh payload generates a long-lasting tunnel effect on-screen, which gradually accelerates. The eighth payload inserts various characters to text input. The ninth and final payload causes the screen to glitch, which is further enhancing the tunnel effect.
Stage 3
Any attempt to terminate the MEMZ trojan, shut down or restart the machine, or log off will result in thousands of dialog boxes that intimidate the user. Once the machine reboots from a Blue Screen of Death, the PC speakers play the well-known Nyan Cat tune and the machine displays the message "Your computer has been trashed by the MEMZ trojan. Now enjoy the Nyan Cat..." The Nyan Cat animation is then displayed.
So, all I'm asking is: how many users have been affected by the trojan?
A clean version of the malware, which is used to demonstrate its payloads, has been featured in a number of videos. I've used it to overload my system (run tons of programs at the same time) and cause memory leakage with the NotMyFault utility from Sysinternals. I laughed as I thought it was meant to be REALLY funny. I hope no one gets affected with this malware, because if they do, they are so doomed.
- Edited by DanPinGF Tuesday, April 16, 2019 4:36 AM Rephrase
Reply:
No matter how hard or complex is the malware , they will be detected by Anti-Virus software.
If you have any sample and it won't detect by Microsoft Anti-Malware products, submit it to Microsoft Malware Protection Center:
https://cyberdefend.wordpress.com/2012/08/11/submit-sample-to-microsoft-malware-protection-center/
------------------------------------
Log Rotate Script
Please let me know how to accomplish this with the below script ? I am new to PS
Permittable limit : 30 GB
Location : E:\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\xxx\xxxx\xxx.war
File name xxx.log
SAMPLE SCRIPT Which I got from Net
function Reset-Log
{
#function checks to see if file in question is larger than the paramater specified if it is it will roll a log and delete the oldes log if there are more than x logs.
param([string]$fileName, [int64]$filesize = 10mb , [int] $logcount = 5)
$logRollStatus = $true
if(test-path $filename)
{
$file = Get-ChildItem $filename
if((($file).length) -ige $filesize) #this starts the log roll
{
$fileDir = $file.Directory
$fn = $file.name #this gets the name of the file we started with
$files = Get-ChildItem $filedir | ?{$_.name -like "$fn*"} | Sort-Object lastwritetime
$filefullname = $file.fullname #this gets the fullname of the file we started with
#$logcount +=1 #add one to the count as the base file is one more than the count
for ($i = ($files.count); $i -gt 0; $i--)
{
#[int]$fileNumber = ($f).name.Trim($file.name) #gets the current number of the file we are on
$files = Get-ChildItem $filedir | ?{$_.name -like "$fn*"} | Sort-Object lastwritetime
$operatingFile = $files | ?{($_.name).trim($fn) -eq $i}
if ($operatingfile)
{$operatingFilenumber = ($files | ?{($_.name).trim($fn) -eq $i}).name.trim($fn)}
else
{$operatingFilenumber = $null}
if(($operatingFilenumber -eq $null) -and ($i -ne 1) -and ($i -lt $logcount))
{
$operatingFilenumber = $i
$newfilename = "$filefullname.$operatingFilenumber"
$operatingFile = $files | ?{($_.name).trim($fn) -eq ($i-1)}
write-host "moving to $newfilename"
move-item ($operatingFile.FullName) -Destination $newfilename -Force
}
elseif($i -ge $logcount)
{
if($operatingFilenumber -eq $null)
{
$operatingFilenumber = $i - 1
$operatingFile = $files | ?{($_.name).trim($fn) -eq $operatingFilenumber}
}
write-host "deleting " ($operatingFile.FullName)
remove-item ($operatingFile.FullName) -Force
}
elseif($i -eq 1)
{
$operatingFilenumber = 1
$newfilename = "$filefullname.$operatingFilenumber"
write-host "moving to $newfilename"
move-item $filefullname -Destination $newfilename -Force
}
else
{
$operatingFilenumber = $i +1
$newfilename = "$filefullname.$operatingFilenumber"
$operatingFile = $files | ?{($_.name).trim($fn) -eq ($i-1)}
write-host "moving to $newfilename"
move-item ($operatingFile.FullName) -Destination $newfilename -Force
}
}
}
else
{ $logRollStatus = $false}
}
else
{
$logrollStatus = $false
}
$LogRollStatus
}
Reset-Log -fileName $logfile -filesize 10mb -logcount 5
- Changed type Bill_Stewart Friday, July 7, 2017 7:10 PM
- Moved by Bill_Stewart Friday, July 7, 2017 7:10 PM This is not "fix/debug/rewrite my script for me" forum
Reply:
You may have missed the first post from right at the top of this forum:
This forum is for scripting questions rather than script requests
-- Bill Stewart [Bill_Stewart]
------------------------------------
Error getting updates 0x8024000d Windows 10 1703
CAS Recovery
Hello,
We have a production environment consisting of a CAS and 5 primary sites.
Now, I want to test SCCM Recovery of only CAS in an isolated environment with same domain name and server name.
Is this possible? Or do I need to create whole hierarchy and then recover CAS?
Reply:
You need an EXACT copy of your DC + CAS server to do the restore. It is not recommend to do this on the same network as you existing DC + CAS.
Honestly if you ever have to recover your CAS, your first step should be to contact MS support.
If you want to look at how to recover a CAS, I blog about recovering my CAS within my test lab. https://www.enhansoft.com/blog/how-to-recover-a-cas-using-a-primary-site-server
Garth Jones
Blog: http://www.enhansoft.com/blog Old Blog: http://smsug.ca/blogs/garth_jones/default.aspx
Twitter: @GarthMJ Book: System Center Configuration Manager Reporting Unleased
------------------------------------
Reply:
Hello Jones,
Thanks for your reply!
Our CAS isn't down actually.
I just need to test it's recovery in an isolated environment consisting of same domain name as production environment and on server having same name as our actual CAS server.
This isolated environment has it's own DC.
This is a part of Disaster Recovery program.
And I just need to test CAS recovery and don't want to create any primary sites in the isolated environment.
Is it possible?
------------------------------------
Reply:
Torsten Meringer | http://www.mssccmfaq.de
------------------------------------
Reply:
Garth already answered that. You need an exact *clone* in the isolated Environment (DC(s) etc).I mean do I need to configure all 5 primary sites as well?
Torsten Meringer | http://www.mssccmfaq.de
I already have a cloned DC.
------------------------------------
Reply:
Torsten Meringer | http://www.mssccmfaq.de
------------------------------------
Reply:
Garth already answered that. You need an exact *clone* in the isolated Environment (DC(s) etc).
Torsten Meringer | http://www.mssccmfaq.de
I mean do I need to configure all 5 primary sites as well?
I already have a cloned DC.
When you say cloned you DC, how exactly did you do that? It can't be a DC called the same thing. It MUST be an exact copy with the same sids, etc.
You will need to restore at least one primary and several secondary sites if you have any.
Garth Jones
Blog: http://www.enhansoft.com/blog Old Blog: http://smsug.ca/blogs/garth_jones/default.aspx
Twitter: @GarthMJ Book: System Center Configuration Manager Reporting Unleased
------------------------------------
Visio 2016 Interacting with Open Office Applications
Hi,
I am facing issues with Visio 2016 XML File (Click to Run) installation over Office 365 as during installation of Visio 2016 it is asking to Close all Opened Office Applications.
May I know is the default behavior of Visio 2016 Installation or there is some way to prevent Office 2016 open application closure(As it is a force closure from Visio 2016 Installation).
Thanks!
Reply:
Hi,
No ..... and the reason is...
Actually the reason it has to close Office applications is they use the same files. Visio is part of the Office Package, just separate. If you notice your Program Files and Program Data folders have Shared Microsoft sub-folders, these are the reason it is required.
Also not really related to your post but something I just found out about 3 months ago that may be helpful to you. Office 2016 itself no longer has the program "Infoview" for viewing Forms based on XML files. The only way to do it now which isn't really ideal is Excel. So if you start to receive errors in SharePoint related to forms that could be the problem.
If you have any more questions, please ask. Take Care.
Cheers,
Kevin
Helpful nice guy
- Edited by Kevin Dondrea Friday, June 9, 2017 7:37 AM
------------------------------------
Reply:
Thanks Kevin for that.
But I have another doubt that whether we can write any Exclude App or Exclude ID for Office 2016 in Configuration section of install-visio.xml file to prevent Un-intimated Opened Office applications Closure.
Thanks!
------------------------------------
DFS namespace folder not working after DFS migration
After hours of frustration i decided to post my question on the Microsoft forum. I'm hoping that someone can help me out.
I recently started a project to split our enormous fileservers into multiple smaller fileservers. Last week i tried to migrate our fileserver containing the homedirectorys of 3000 user account. It has 5 disks (1 disk per site). These disks needed to be equaly devided along 2 new fileservers.
To summarize our current DFS structure
Root DFS namespace: \\example.com\data\
- Fileserver (SERVER01) had 1 shared folder (HOME) containing multiple mountpoints (site1 / site2 / site3 /site 4 / site5)
- DFS folder target \\example.com\data\home pointing at \\SERVER01\Home
New situation
- From the DFS management console we deleted the old DFS namespace folder \\example.com\data\home and created a new folder with the same name (no target attached to this folder)
- We then created multiple subdirectorys under \\example.com\data\home
It would look something like:
- \\example.com\data\home > no DFS folder target
- \\example.com\data\home\site1 > DFS folder target pointing to \\SERVER01\SITE01
- \\example.com\data\home\site2 > DFS folder target pointing to \\SERVER01\SITE02
- \\example.com\data\home\site3 > DFS folder target pointing to \\SERVER02\SITE03
- \\example.com\data\home\site4 > DFS folder target pointing to \\SERVER03\SITE04
Share- and NTFS permissions where the same as before.
After the migration our clients where not able to access the new DFS folder or subdirectorys \\example.com\data\home
When i renamed the 'Home' folder to something else eg \\example.com\data\testing\Site1 clients where able to access the share without any problems.
Looked like some sort of caching was in the way so i waited about an hour or so and tested again, but still the same result.
Whats going on?
- Edited by Wietze Jansma Friday, July 29, 2016 8:33 AM
Reply:
Hi Wietze,
Can you provide what is the OS you are hosting DFS on?
If it is Windows 2008R2 there is a hotfix to fix a similar permissions issue.
https://support.microsoft.com/en-us/kb/2464365
Regards, Jim MSCS - MCP Disclaimer: This posting is provided AS IS with no warranties or guarantees , and confers no rights. When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
------------------------------------
Reply:
------------------------------------
Reply:
DFS must be installed as a Feature on the local machine in order to clear the DFS cache.
Use the directory that the computer installed DFSUTIL.exe into to create a script called DFS-Flush.CMD.
This is what DFS-Flush.CMD should look like.
dfsutil cache domain flush
dfsutil cache referral flush
dfsutil cache provider flush
ping -n 5 127.0.0.1 >NUL
The 5 second pause is intentional so that you can verify that the command ran successfully.
Link for Remote Server Administration Tools (RSAT) for Windows 7:
https://www.microsoft.com/en-us/download/details.aspx?id=7887
------------------------------------
skype for business
Reply:
Can you elaborate more on your situation?
Like:
-What SfB client you are using?
-Other users working fine and only having the issue?
-Is your account on-premise or cloud?
-Where are you trying to access the SfB? Internal/Corporate network or External?
-What's the prompt on the SfB client when you login?
Regards,
Loremar
------------------------------------
Combine 2 cmdlet outputs into 1 exported file
Hi,
I'm trying to make one powershell script that'll show me all the information I want for all the computers under my control. I want all the properties listed here for Get-ADComputer:
Name,UserPrincipalName,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion
And I also want to see what users are currently logged in to each computer using this command:
query user /server:$SERVER
And I want this all to come out in one CSV file with headings. I've found how to do it with just the Get-ADComputer properties:
Get-ADComputer -Filter {OperatingSystem -Notlike "*Server*" -and Name -Like "*LIB-ITD*"} -Property * | Select-Object Name,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion | Export-CSV C:\Users\selft\Desktop\AllWindows.csv -NoTypeInformation -Encoding UTF8 But I also want a heading that shows the users that are currently logged into the computer. I'm sure it's something simple but I haven't had much Powershell scripting experience
- Changed type Bill_Stewart Friday, July 7, 2017 7:08 PM
- Moved by Bill_Stewart Friday, July 7, 2017 7:09 PM This is not "scripts on demand"
Reply:
Unfortunately this isn't a "can someone script this for me" forum. Please read this first:
This forum is for scripting questions rather than script requests
-- Bill Stewart [Bill_Stewart]
------------------------------------
Reply:
Perhaps an input (but I could be completely wrong too ^^)?
Try defining variables for each statement and combine them in the output. I didn't work with CSV yet, but there must be a combine function or something like that which can combine them to one output. But with two variables, each for a command, you can't be wrong.
------------------------------------
Reply:
This is a perfect problem to use to learn basic PowerShell. Start a tutorial or book with this in mind and you will quickly learn how to write a script.
\_(ツ)_/
------------------------------------
SharePoint Online 2013 External User sign in
Hi,
I have an external user who is trying to access our SharePoint tenant. He receives a sharing invitation, clicks the hyperlink, enters his work or school credentials when prompted, but once signed in he always receives the below error.
1. I have removed the user from pending access requests and invitations
2. I have checked the entire site collection to see if the user has an existing entry by amending the permissions URL to "people.aspx?MembershipGroupId=0"
3. I have checked to see if an #EXT# entry has been created in O365 - no entry created
Can anyone advise?
Thanks,
Callum
Callum
Reply:
Hi Callum- I would try the following troubleshooting/fixes. If they don't work, I'd escalate your issue to Microsoft.
cameron rautmann
------------------------------------
Reply:
cameron rautmann
------------------------------------
Reply:
Hi,
Thank you but this did not work. I will raise with MS.
I will post on the '13 forum next time.
thanks,
Callum
Callum
------------------------------------
BSOD Issues
Hi people, im having various BSOD issues, heres the details of the last 4 i have had, i need help with it please
the highlighted error files" are afd.sys, ntkrnlpa.exe for the most recent two and the first BSOD
the files for the other two remaining bsod are, ntkrn.exe and win32k.sys
| Dump File | Crash Time | Bug Check String | Bug Check Code | Parameter 1 | Parameter 2 | Parameter 3 | Parameter 4 | Caused By Driver | Caused By Address | File Description | Product Name | Company | File Version | Processor | Crash Address | Stack Address 1 | Stack Address 2 | Stack Address 3 | Computer Name | Full Path | Processors Count | Major Version | Minor Version | Dump File Size | Dump File Time |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Mini060717-01.dmp | 07/06/2017 16:07:22 | SYSTEM_THREAD_EXCEPTION_NOT_HANDLED | 0x1000007e | 0xc0000005 | 0xf3600413 | 0xb6519aa0 | 0xb651979c | 32-bit | C:\Windows\Minidump\Mini060717-01.dmp | 4 | 15 | 6002 | 151,616 | 07/06/2017 16:13:16 | |||||||||||
| Mini060617-01.dmp | 06/06/2017 12:07:25 | SYSTEM_THREAD_EXCEPTION_NOT_HANDLED | 0x1000007e | 0xc0000005 | 0xcd600413 | 0xa4e4caa0 | 0xa4e4c79c | 32-bit | C:\Windows\Minidump\Mini060617-01.dmp | 4 | 15 | 6002 | 151,088 | 06/06/2017 17:08:26 | |||||||||||
| Mini052717-01.dmp | 27/05/2017 10:12:19 | KERNEL_MODE_EXCEPTION_NOT_HANDLED | 0x1000008e | 0xc0000005 | 0xb3896bf5 | 0xc8a97a40 | 0x00000000 | win32k.sys | win32k.sys+96bf5 | Multi-User Win32 Driver | Microsoft® Windows® Operating System | Microsoft Corporation | 6.0.6000.16386 (vista_rtm.061101-2205) | 32-bit | win32k.sys+96bf5 | win32k.sys+12bdb2 | win32k.sys+ed271 | win32k.sys+ed436 | C:\Windows\Minidump\Mini052717-01.dmp | 4 | 15 | 6002 | 157,928 | 27/05/2017 13:35:12 | |
| Mini052317-01.dmp | 22/05/2017 19:52:10 | KERNEL_MODE_EXCEPTION_NOT_HANDLED | 0x1000008e | 0xc0000005 | 0xb3b46bf5 | 0x8f586a40 | 0x00000000 | win32k.sys | win32k.sys+96bf5 | Multi-User Win32 Driver | Microsoft® Windows® Operating System | Microsoft Corporation | 6.0.6000.16386 (vista_rtm.061101-2205) | 32-bit | win32k.sys+96bf5 | win32k.sys+12bdb2 | win32k.sys+ed271 | win32k.sys+ed436 | C:\Windows\Minidump\Mini052317-01.dmp | 4 | 15 | 6002 | 151,376 | 23/05/2017 17:05:19 | |
| Mini051917-01.dmp | 19/05/2017 16:01:24 | SYSTEM_THREAD_EXCEPTION_NOT_HANDLED | 0x1000007e | 0xc0000005 | 0xf1c00413 | 0x8ef30aa0 | 0x8ef3079c | 32-bit | C:\Windows\Minidump\Mini051917-01.dmp | 4 | 15 | 6002 | 151,040 | 19/05/2017 16:08:38 |
- Moved by Carey FrischMVP Thursday, June 8, 2017 7:45 AM Relocated
Reply:
Your best friend here could be windows update.
Can you please provide OS version and third party applications that are installed?
RegardsAnurag
www.apps4rent.com
------------------------------------
Reply:
------------------------------------
Creating a subscription to the transactional publication
I try to create the subscription and processes were finished successfully. However, in the subscriber server, I did not see the db. I checked "to view the synchronization status of the subscription", I found the error message said: The process could not connect to Subscriber "xxxxxx".
The error message is below:
SQLServerAgent Error: Request to run job XXXXXX (from User XXXX- my domain user) refused because the job is already running from a request (from sa as the database owner is sa) by Start Sequence 0.
Changed database context to 'XXXX'. (.Net SqlClient Data Provider)
Any ideas to fix this?
Reply:
Just to clarify u do not see database that is a subscriber db?
Agent is failing because of these things:
1. The subscriber database has been dropped (somehow).
2. The account that is used to connect to subscriber do not have enough permissions to access that database (you need to modify subscription configuration and use correct user or grant permissions on subscriber)
Try also change job ownership (distribution agent) on Distributor to distributor_Admin or sa.
------------------------------------
Adding account to permssions - "..could not be found" or "We couldn't find exact match"
I'm not sure why, but I am no longer able to add a service account to my site collection - either in Site Collection Administrators or in the general permissions. I've added error below from the logs.
I've check AD and account is there and I've added the account to other site collections in the past with no problems.
Application error when access /_admin/owners.aspx, Error=The specified user DOMAIN\name_agent could not be found. at Microsoft.SharePoint.SPWeb.EnsureUser(String logonName) at Microsoft.SharePoint.Administration.SPSiteAdministration.set_SecondaryContactLoginName(String value) at Microsoft.SharePoint.ApplicationPages.OwnersPage.BtnConfirm_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Reply:
Also tried adding via Powershell and getting the below...
------------------------------------
Reply:
------------------------------------
Reply:
顺其自然地勇往直前!—Justin Liu
------------------------------------
Test LAB in the same AD domain - exactly identical to production servers - hostnames IP Addresses -but possibly NAT'd-behind a firewall can it be done!
Here's one for super geeks who like to peer into the guts of AD
Requirement is to create a number of test servers that must remain exactly identical "in every way" to their production counterparts, where these systems are also present in the same domain. Understanding the perils of duplicate IP addresses, hiding systems behind firewalls where we likely would NOT put a DC back there with them (or should we).
Question: Is this something that could potentially upset AD's methods of maintaining server identity and possibly affect the production server environment? I would appreciate any insight or opinion... I have already read "Don't go there" but I want to dig into this further.
Here's how I would try to go about it... domain is DomA
1) Clone the production machine "server1" and bring the clone machine into "DomA", as "server1b" in order to get a unique GUID etc.. perform the same on any partner test systems.
2) Move these systems behind an iron wall and rename each server to it's production counterpart - including IP Address.
3) Set up NAT translation tables to map all test systems to their test partners.
What worries me about this approach, can IP address spoofing get us into trouble with AD computer records by means of updates/refreshes of their passwords or maybe via DNS name to IP updates etc..
1) Test server1b renamed... updates DNS and then later does a refresh of it's machine password any chance a foul out against the secure channel on the production server or is it all GUID specific?
2) Applications that use SQL server must somehow be able to translate SPN records e.g MSSQLSRV\server1.doma.com:1433
3) Time & Kerberos - 5 min tolerance... could these isolated servers get their system time externally - perhaps the same time servers that the root domain's PDC gets it's time from?
Any thoughts on how to better accomplish this "test lab" would be much appreciated. But "exact sameness" is a must.
l




No comments:
Post a Comment